[pgpool-general: 9201] Re: Patroni and pgpool

Bo Peng pengbo at sraoss.co.jp
Thu Sep 5 11:52:09 JST 2024


hi,

> I would like to get your opinion if using pgpool on setup with Patroni is advisable.  

Since I'm not  familiar with Patroni, I'm not sure that Pgpool-II works well with Patroni.
It is recommended to verify it in advance.

> If so, how does pgpool know when failover occurred, since the failover is handled by Patroni.  
> Afterall pgpool needs to know it immediately so it will direct the write statements to the correct node.

Pgpool-II cannot detect failovers performed by Patroni. 
However, Pgpool-II's health check mechanism can detect PostgreSQL failures and
update the status (up/down) and role (primary/standby) managed by Pgpool-II.

Because failover is handled by Patroni, 
you need to disable "failover_command" and "follow_primary_command".
Also I recommend to disable "failover_on_backend_error" to avoid accidental failover.

-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/



More information about the pgpool-general mailing list