1

오류를 스트리밍에 SQL 쿼리를 실행할 수 없습니다 :복제 설정 마스터 서버 PostgreSQL을 9.5

postgres=# insert into company values(4,'tom',21,'pune' ,21); 
^CCancel request sent 
WARNING: canceling wait for synchronous replication due to user request 
DETAIL: The transaction has already committed locally, but might not have been         replicated to the standby. 
INSERT 0 1 

에도 오류 후 마스터에 쿼리를 실행뿐만 아니라 거래에게 노예를 복제한다. 마스터에

:

postgres=# SELECT pg_current_xlog_location(); 
pg_current_xlog_location 
-------------------------- 
0/1900D0C0 
(1 row) 

슬레이브 (나에 의해 설정) 설정 파일에서 마스터에 설정

postgres=# SELECT pg_last_xlog_receive_location(); 
pg_last_xlog_receive_location 
------------------------------- 
0/1900D0C0 
(1 row) 

synchronous_standby_name 내가 pg_stats_replication 테이블의 레코드를 볼 수있는 응용 프로그램 이름과 다릅니다. 많은 솔루션이 응용 프로그램 이름을 변경하도록 제안했습니다. 그러나 마스터에서 응용 프로그램 이름을 walreceiver로 사용하고 있는지 확실하지 않습니다. 마스터에

: 내가 찾은 솔루션의

postgres=# select application_name, sync_state from pg_stat_replication; 
application_name | sync_state 
------------------+------------ 
walreceiver  | async 
(1 row) 

postgres=# show synchronous_standby_names; 
synchronous_standby_names 
--------------------------- 
slave1 
(1 row) 

postgres=# show synchronous_commit; 
synchronous_commit 
-------------------- 
on 
(1 row) 

하나는 경로 내가 현재 가지고 있겠지 '/var/lib/pgsql/9.2/data/'아래 테이블 디렉토리를 만드는 것입니다. 해당 솔루션이 9.5 Postgresql에서 작동하는지 확실하지 않습니다.

이 문제에 대한 도움을 주시면 감사하겠습니다. 고맙습니다.

답변