[pgpool-general: 7936] Re: multiple pgpools trying to make failover at the same time

martin.quevedo at temiandu.com martin.quevedo at temiandu.com
Tue Dec 14 16:16:58 JST 2021


Nice!

Thank you

-----Original Message-----
From: Tatsuo Ishii <ishii at sraoss.co.jp> 
Sent: Tuesday, December 14, 2021 1:06 AM
To: martin.quevedo at temiandu.com
Cc: pgpool-general at pgpool.net
Subject: Re: multiple pgpools trying to make failover at the same time

Hi Martin,

>  Hello Tatsuo,
> 
> I was wondering, in case I have several web servers all with pgpool 
> and two postgres servers in streaming replication. How does PGPool 
> deals with the failover command when the master fails ?
> Will all pgpools try to execute the failover command at the same time?
> Is there a mechanism in which pgpool (or the failover script) can 
> detect the failover is already in progress and give up ?

Yes, there's an interlocking mechanism to prevent multiple pgpool trying to
execute failover at the same time. This is only possible when watchdog is
enabled.

> Is this explained somewhere in the docs ?

Yes.
https://www.pgpool.net/docs/latest/en/html/tutorial-watchdog-intro.html
4.1.1. Coordinating multiple Pgpool-II nodes

"Watchdog also coordinates with all connected Pgpool-II nodes to ensure that
failback, failover and follow_primary commands must be executed only on one
pgpool-II node. "

Best reagards,
--
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