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

Tatsuo Ishii ishii at sraoss.co.jp
Tue Dec 14 13:06:29 JST 2021


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