[pgpool-committers: 2844] pgpool: Watchdog node goes into the WD_WAITING_FOR_QUORUM state wheneve

Muhammad Usama m.usama at gmail.com
Fri Dec 4 00:14:29 JST 2015

Watchdog node goes into the WD_WAITING_FOR_QUORUM state whenever the quorum is
not present or lost. Although it is a good guard against the split-brain syndrome,
but there is a problem with this technique. pgpool-II commands which require
a cluster wide synchronization like interlocking commands start getting failed
when the node is in waiting for quorum, as these commands requires a central
coordinator node for processing

The fix for this is to remove the WD_WAITING_FOR_QUORUM state and make sure that
the cluster always elects the master node even when the quorum is not present.
But the trick is not to execute the escalation commands on master node when the
quorum is missing and waits until the quorum is complete. This new design
ensures that even when because of network partitioning or some other issue the
cluster gets multiple master nodes (split-brain syndrome) the VIP conflict will
still not happen and that multiple master node would be harmless.



Modified Files
src/include/watchdog/watchdog.h |    1 -
src/watchdog/watchdog.c         |  455 +++++++++++++++++++++++++--------------
src/watchdog/wd_escalation.c    |    2 +-
src/watchdog/wd_heartbeat.c     |    6 +-
src/watchdog/wd_lifecheck.c     |    2 +-
5 files changed, 304 insertions(+), 162 deletions(-)

More information about the pgpool-committers mailing list