[pgpool-general: 7335] Force failover of pgpool watchdog leader

Emond Papegaaij emond.papegaaij at gmail.com
Wed Nov 11 19:30:43 JST 2020


Hi all,

Is it possible to force the watchdog leader to switch to a different
node in the cluster without stopping the current pgpool leader process
entirely?

The reason I want to do this is to automate switchover when a host in
my cluster is shut down or rebooted. Every host runs a database and a
pgpool instance. So if the machine that is about to shut down is both
pg primary and pgpool watchdog leader, both need to switch over to a
different node. I can detach the pg primary to force a switchover, but
if I then shutdown the pgpool leader (running on the same host), the
database switchover is not completed correctly. When a different host
is watchdog leader, the database switchover process continues when the
shutdown host disappears and my cluster remains consistent.

My current solution is to stop pgpool if it currently is the watchdog
leader, start it again, wait for some other node to pick up the leader
status, trigger the database switchover and finally shutdown pgpool
and postgres. This process is lengthy, complex and increases the
amount of time the node is in a broken state.

Best regards,
Emond Papegaaij


More information about the pgpool-general mailing list