[pgcluster: 1007] ネットワーク障害時におけるSQLクエリーの発行について
小玉 芳信
y-kodama @ kk-mic.jp
2007年 11月 7日 (水) 14:51:59 JST
$B$*@$OC$K$J$C$F$*$j$^$9!#(B
$B$3$@$^$H?=$7$^$9!#(B
$B%[%9%H(BA$B!'%/%i%9%?(BDB$B!"%l%W%j%1!<%7%g%s%5!<%P!J(B192.168.x.A$B!K(B
$B%[%9%H(BB$B!'%/%i%9%?(BDB$B!J(B192.168.x.B$B!K(B
$B%[%9%H(BC$B!'%/%i%9%?(BDB
$B>e5-$N9=@.$GF0:n8!>Z$r9T$C$F$$$^$9!#(B
$B%[%9%H(BB$B$K$F%M%C%H%o!<%/>c32$^$?$O(BOS$B%7%c%C%H%@%&%sEy$,H/@8$7$?>l9g$K!"(B
$B%[%9%H(BA$B$GH/9T$7$?99?77O(BSQL$B%/%(%j!<!J(BINSERT$B!K$N<B9T$,La$C$F$3$J$$8=>]$,H/@8$7$F$$$^$9!#(B
$BF0:n<j=g(B
$B-!%[%9%H(BA$B!'%/%i%9%?(BDB$B5/F0(B
$ pg_ctl start -o "-i"
$B-"%[%9%H(BA$B!'%l%W%j%1!<%7%g%s%5!<%P5/F0(B
$ pgreplicate -vn
$B-#%[%9%H(BB$B!'%/%i%9%?(BDB$B5/F0(B
$ pg_ctl start -o "-i"
$B-$%[%9%H(BC$B!'%/%i%9%?(BDB$B5/F0(B
$ pg_ctl start -o "-i"
$B-%%[%9%H(BB$B!'%M%C%H%o!<%/@ZCG!J$^$?$O(BOS$B%7%c%C%H%@%&%s!K(B
$B-&%[%9%H(BA$B!'%?!<%_%J%k%&%#%s%I%&$+$i(Bpsql "DB$BL>(B"$B$G@\B3$7$F!"99?77O%/%(%j!<$rH/9T(B
$ psql "DB$BL>(B"
$B-&$r<B9T$9$k$H<B9T$7$?%/%(%j!<$N1~Ez$,JV$C$F$3$J$$>uBV$H$J$k!#(B
$B$3$N4V$K!"JL%?!<%_%J%k%&%#%s%I%&$rN)$A>e$2$F%[%9%H(BA$B$N(BDB$BFb%G!<%?$r(Bselect$B$GI=<($9$k$H!"(B
$B-&$N=hM}7k2L$OH?1G$5$l$F$$$^$;$s!#(B
$B$7$+$7!"%[%9%H(BC$B$N(BDB$B$K$O-&$G$N%/%(%j!<$N<B9T$,%G!<%?F14|$5$l$F$$$^$9!#(B
$B==?tJ,7P2a$9$k$H-&$N1~Ez$,JV$C$F$/$k$N$G$9$,!"(B
$B?tICDxEY$G$N1~Ez$r4|BT$7$F$*$j$^$9!#(B
$B:G=*L\I8$H$7$^$7$F$O!"%[%9%H(BA$B$G$N99?77O%/%(%j!<$N1~Ez$,B(;~$KJV$C$F$/$k$3$H$r4|BT$7$F$*$j$^$9!#(B
$B @ _DjEy$N$4;XE&$rD:$1$J$$$G$7$g$&$+!#(B
$B$h$m$7$/$*4j$$$$$?$7$^$9!#(B
$B%[%9%H(BA$B$N%l%W%j%1!<%7%g%s%5!<%P%m%0$O0J2<$NDL$j$G!"(B
$B$3$l$r7+$jJV$7I=<($7$F$$$^$9!#(B
$BF14|BP>]$N%[%9%H(BB$B$H@\B3$G$-$J$$$H$$$C$?FbMF$N%m%0$H!"(B
$B%/%(%j!<$rH/9T$7$?%[%9%H(BA$B<+?H$K=q$-9~$_$,=PMh$J$$>uBV$G$"$k$H$$$C$?FbMF$N%m%0$@$H9M$($F$$$^$9!#(B
2007-11-07 13:44:40 [2437] ERROR:PGRcreateConn():Retry. h_errno is 0,reason is 'could not connect to server: No route to host
Is the server running on host "192.168.x.B" and accepting
TCP/IP connections on port 5432?
'
2007-11-07 13:44:43 [2437] ERROR:PGRcreateConn():Retry. h_errno is 0,reason is 'could not connect to server: No route to host
Is the server running on host "192.168.x.B" and accepting
TCP/IP connections on port 5432?
'
2007-11-07 13:44:46 [2437] ERROR:PGRcreateConn():Retry. h_errno is 0,reason is 'could not connect to server: No route to host
Is the server running on host "192.168.x.B" and accepting
TCP/IP connections on port 5432?
'
2007-11-07 13:44:47 [2522] DEBUG:PGRdo_replicate():query :: INSERT into cmn_user_tbl(user_id,password) VALUES('user1','pass1')
2007-11-07 13:44:47 [2522] DEBUG:cmdSts=Q
2007-11-07 13:44:47 [2522] DEBUG:cmdType=I
2007-11-07 13:44:47 [2522] DEBUG:rlog=3
2007-11-07 13:44:47 [2522] DEBUG:port=5432
2007-11-07 13:44:47 [2522] DEBUG:pid=2497
2007-11-07 13:44:47 [2522] DEBUG:from_host=192.168.x.A
2007-11-07 13:44:47 [2522] DEBUG:dbName=test
2007-11-07 13:44:47 [2522] DEBUG:userName=user1
2007-11-07 13:44:47 [2522] DEBUG:recieve sec=1194410687
2007-11-07 13:44:47 [2522] DEBUG:recieve usec=690424
2007-11-07 13:44:47 [2522] DEBUG:query_size=79
2007-11-07 13:44:47 [2522] DEBUG:request_id=3
2007-11-07 13:44:47 [2522] DEBUG:replicate_id=0
2007-11-07 13:44:47 [2522] DEBUG:recovery_status=0
2007-11-07 13:44:47 [2522] DEBUG:query=INSERT into cmn_user_tbl(user_id,password) VALUES('user1','pass1')
2007-11-07 13:44:47 [2522] DEBUG:sem_lock [1] req
$B4D6-$O0J2<$NDL$j$G$9!#(B
Fedora Core 5
pgcluster-1.7.0rc7
[cluster.conf] $B%[%9%H(BB$B!"%[%9%H(BC$B$K$D$$$F$O(B<Host_Name>$B$r(BHOSTB$B$^$?$O(BHOSTC$B$KCV$-49$((B
<Replicate_Server_Info>
<Host_Name> HOSTA </Host_Name>
<Port> 8001 </Port>
<Recovery_Port> 8101 </Recovery_Port>
</Replicate_Server_Info>
<Host_Name> HOSTA </Host_Name>
<Recovery_Port> 7001 </Recovery_Port>
<Rsync_Path> /usr/bin/rsync </Rsync_Path>
<Rsync_Option> ssh -1 </Rsync_Option>
<Rsync_Compress> yes </Rsync_Compress>
<Pg_Dump_Path> /usr/local/pgsql/bin/pg_dump </Pg_Dump_Path>
<When_Stand_Alone> read_write </When_Stand_Alone>
<Replication_Timeout> 1 min </Replication_Timeout>
<LifeCheck_Timeout> 3s </LifeCheck_Timeout>
<LifeCheck_Interval> 11s </LifeCheck_Interval>
[pgreplicate.conf]
<Cluster_Server_Info>
<Host_Name> HOSTA </Host_Name>
<Port> 5432 </Port>
<Recovery_Port> 7001 </Recovery_Port>
</Cluster_Server_Info>
<Cluster_Server_Info>
<Host_Name> HOSTB </Host_Name>
<Port> 5432 </Port>
<Recovery_Port> 7001 </Recovery_Port>
</Cluster_Server_Info>
<Cluster_Server_Info>
<Host_Name> HOSTC </Host_Name>
<Port> 5432 </Port>
<Recovery_Port> 7001 </Recovery_Port>
</Cluster_Server_Info>
<Host_Name> HOSTA </Host_Name>
<Replication_Port> 8001 </Replication_Port>
<Recovery_Port> 8101 </Recovery_Port>
<RLOG_Port> 8301 </RLOG_Port>
<Response_Mode> normal </Response_Mode>
<Use_Replication_Log> yes </Use_Replication_Log>
<Replication_Timeout> 1min </Replication_Timeout>
<LifeCheck_Timeout> 3s </LifeCheck_Timeout>
<LifeCheck_Interval> 15s </LifeCheck_Interval>
<Log_File_Info>
<File_Name> /tmp/pgreplicate.log </File_Name>
<File_Size> 1M </File_Size>
<Rotate> 3 </Rotate>
</Log_File_Info>
[pg_hba.conf]
$B0J2<$N#19T$rDI2C(B
host all all 192.168.1.0/24 trust
[postgres.conf]
$B0J2<$K @ _DjJQ99(B
listen_addresses = '*'
port = 5432
$B0J>e$G$9!#(B
pgcluster メーリングリストの案内