[pgpool-general: 3028] Re: Last node in pgpool chain failover

Yugo Nagata nagata at sraoss.co.jp
Tue Jul 15 14:51:34 JST 2014


Hi,

On Mon, 30 Jun 2014 16:42:44 -0400
Long On <on.long.on at gmail.com> wrote:

> Hello,
> 
> I have 2 postgresql nodes, 01 (primary) and 02 (standby), set up with
> postgresql streaming replication. pgpool2 works well with this initial
> configuration.
> 
> postgresql 01 is stopped to trigger failover to 02. This too is working
> well with pgpool2, as indicated by log below. postgresql 02 becomes new
> master.
> 
> 2014-06-29 20:33:41 LOG:   pid 16186: wd_end_interlock: end interlocking
> 2014-06-29 20:33:42 LOG:   pid 16186: failover: set new primary node: -1
> 2014-06-29 20:33:42 LOG:   pid 16186: failover: set new master node: 1
> 2014-06-29 20:33:42 LOG:   pid 16186: failover done. shutdown host 01(5432)
> 
> At this point I recover postgresql 01 to become a standby to 02. Connection
> via pgpool2 works well here too.
> 
> Next, postgresql 02 (primary) is stopped to trigger failover back to 01.
> Failover of the two postgresql back-ends works the same way as above. 01 is
> new master and 02 is standby.
> 
> However, pgpool2 is not able to recognize 01 has become new master. It
> fails to set new master node: 0, as seen below. Connection via pgpool2
> result in connection refused.
> 
> 2014-06-29 20:59:52 LOG:   pid 16186: wd_end_interlock: end interlocking
> 2014-06-29 20:59:53 LOG:   pid 16186: failover: set new primary node: -1
> 2014-06-29 20:59:53 LOG:   pid 16186: failover done. shutdown host 02(5432)
> 
> I am new to postgresql and pgpool so I may have missed some configuration
> settings. Looking around the web haven't turn up any helpful hints yet.

"failover: set new primary node: -1" seems odd. pgpool might fail to
detect primary node in backends at the first failover. 

Could you please show me your pgpool.conf and full log messages?

> 
> Any idea how I can fix this?
> 
> Your help is much appreciated.
> 
> Regards,
> Long


-- 
Yugo Nagata <nagata at sraoss.co.jp>


More information about the pgpool-general mailing list