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

Tatsuo Ishii ishii at postgresql.org
Mon Aug 27 21:39:57 JST 2012


That's because you regenerated the dead backend 0 as a master.  You
should rebuild backend 0 as new slave(standby), that is, you need to
recovery backend 0.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

> 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


More information about the pgpool-general mailing list