[pgpool-general: 919] attaching the old master causes it to become the new master

Kent Tong kent.tong.mo at gmail.com
Mon Aug 27 16:43:03 JST 2012


Hi,

I am using 3.1.3. Let's say backend 0 was the master and backend 1 was the
slave (in streaming replication). Since backend 0 died, backend 1 was
promoted as the new master. This was fine. However, when I try to attach
backend 0 using pcp_attach_node (NOT pcp_recovery_node), pgpool tries to
make backend 0 the master again. Is there any way to prevent it? The log is
shown below. Thanks in advance!

Aug 27 15:32:23 pgpool02 pgpool[362]: find_primary_node: primary node id is
1
Aug 27 15:32:23 pgpool02 pgpool[362]: failover: set new primary node: 1
Aug 27 15:32:23 pgpool02 pgpool[362]: failover: set new master node: 1
Aug 27 15:32:23 pgpool02 pgpool[3100]: worker process received restart
request
Aug 27 15:32:23 pgpool02 pgpool[362]: failover done. shutdown host
masterdb(5432)
Aug 27 15:32:23 pgpool02 pgpool[7234]: do_child: failback event found.
restart myself.
Aug 27 15:32:24 pgpool02 pgpool[3101]: pcp child process received restart
request
Aug 27 15:32:24 pgpool02 pgpool[362]: worker child 3100 exits with status
256
Aug 27 15:32:24 pgpool02 pgpool[362]: fork a new worker child pid 7239
Aug 27 15:32:24 pgpool02 pgpool[362]: PCP child 3101 exits with status 256
Aug 27 15:32:24 pgpool02 pgpool[362]: fork a new PCP child pid 7240
Aug 27 15:32:26 pgpool02 pgpool[7232]: connection received:
host=192.168.4.254 port=34101
Aug 27 15:32:32 pgpool02 pgpool[7240]: send_failback_request: fail back 0
th node request fro
m pid 7240
Aug 27 15:32:32 pgpool02 pgpool[362]: starting fail back. reconnect host
masterdb(5432)
Aug 27 15:32:32 pgpool02 pgpool[362]: execute command: /tmp/f1.sh 0 masterdb
Aug 27 15:32:32 pgpool02 pgpool[362]: Do not restart children because we
are failbacking node
 id 0 hostmasterdb port:5432 and we are in streaming replication mode
Aug 27 15:32:32 pgpool02 pgpool[362]: find_primary_node_repeatedly: waiting
for finding a pri
mary node
Aug 27 15:32:32 pgpool02 pgpool[362]: find_primary_node: primary node id is
0
Aug 27 15:32:32 pgpool02 pgpool[362]: failover: set new primary node: 0


-- 
Kent Tong
IT author and consultant, child educator
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20120827/87819935/attachment.html>


More information about the pgpool-general mailing list