[pgpool-general: 4178] Re: failover: set new primary node: -1

Tatsuo Ishii ishii at postgresql.org
Tue Nov 10 08:19:38 JST 2015


> Hello,
> 
> We are using pgpool II
> # pgpool -version
> pgpool-II version 3.4.2 (tataraboshi)
> 
> we have the following setup:
> 
> one pgpool node, with one master DB and 3 slave nodes
> 
> during our failover testing, after server failover happened,
> 
> we got the following:
> 2015-11-07 08:43:52: pid 6378: LOG:  failover: set new primary node: -1
> 2015-11-07 08:43:52: pid 6378: LOG:  failover: set new master node: 0
> 
> But at this point the master node is actually node 1, the pgpool set the wrong node as master node.

"master node" != "primary node" in pgpool-II terms. The master node is
a live node which has the youngest node id. So if node 0 is alive,
your master node is 0.

> Can someone help to answer why the pgpool will set the new primary node: -1?
> 
> Is this a known bug?

Probably pgpool-II fails to detect the node is actually a primary. See
below to know how pgpool-II detects a primary node.

http://pgpool.net/mediawiki/index.php/FAQ#How_does_pgpool-II_find_the_primary_node.3F

Also enabling debug mode (-d) will generate help us to see what's
going on when failover occurs.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-general mailing list