[pgpool-general: 8453] Re: Watchdog using only 2 nodes

Bo Peng pengbo at sraoss.co.jp
Tue Oct 11 16:45:02 JST 2022


Hello,

> Should I discard the use of watchdog? Is there any possibility to make it
> work with only 2 nodes?

If you are using Pgpool-II with two Pgpool-II nodes,
you need to enable the following parameter to ensure that VIP is up even if one node goes down.

  enable_consensus_with_half_votes = on

https://www.pgpool.net/docs/43/en/html/runtime-watchdog-config.html#GUC-ENABLE-CONSENSUS-WITH-HALF-VOTES

Plase note that enabling this parameter may cause split-brain.


On Tue, 11 Oct 2022 09:26:54 +0200
Jesús Campoy <jesuscampoy at gmail.com> wrote:

> Hi all,
> 
> I'm trying to configure watchdog in pgpool version 4.3.2 (tamahomeboshi)
> using streaming replication with two nodes, one as primary and another as
> standby.
> But I just read in the documentation that to use watchdog requires at least
> 3 nodes. As I mentioned, I have only 2 nodes and I don't have the
> possibility to add a third one.
> Should I discard the use of watchdog? Is there any possibility to make it
> work with only 2 nodes?
> 
> 4.1. Introduction
> 
> Watchdog is a sub process of Pgpool-II to add high availability. Watchdog
> is used to resolve the single point of failure by coordinating multiple
> Pgpool-II nodes. The watchdog was first introduced in pgpool-II V3.2 and is
> significantly enhanced in Pgpool-II V3.5, to ensure the presence of a
> quorum at all time. This new addition to watchdog makes it more fault
> tolerant and robust in handling and guarding against the split-brain
> syndrome and network partitioning. In addition, V3.7 introduced quorum
> failover (see Section 5.14.6
> <https://www.pgpool.net/docs/42/en/html/runtime-watchdog-config.html#CONFIG-WATCHDOG-FAILOVER-BEHAVIOR>)
> to reduce the false positives of PostgreSQL server failures. To ensure the
> quorum mechanism properly works, the number of Pgpool-II nodes must be odd
> in number and greater than or equal to 3.
> delegate_IP (string)
> 
> Specifies the virtual IP address (VIP) of Pgpool-II that is connected from
> client servers (application servers etc.). When a Pgpool-II is switched
> from standby to active, the Pgpool-II takes over this VIP. VIP will not be
> brought up in case the quorum does not exist. Default is ''(empty): which
> means virtual IP will never be brought up.
> 
> This parameter can only be set at server start.
> 
> Thanks in advance.
> 
> Best,
> Jesús


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS LLC
https://www.sraoss.co.jp/


More information about the pgpool-general mailing list