[pgpool-general: 7677] Re: Failover question

Bo Peng pengbo at sraoss.co.jp
Sat Aug 28 01:05:57 JST 2021


Hello,

> My question is why watchdog doesn’t come up on node 3. Pgpool.conf is set the same on all 3 nodes.

If you shut down pgpool node1 and node2, the number of alive pgpool is one,
the quorum does not exist.

If you want to enable watchdog even if the quorum does not exist,
you need to enable the parameter "enable_consensus_with_half_votes".

See more detail about "enable_consensus_with_half_votes":
https://www.pgpool.net/docs/latest/en/html/runtime-watchdog-config.html#GUC-ENABLE-CONSENSUS-WITH-HALF-VOTES

> I have a 3 nodes setup for pgpool/postgresql using watchdog, When testing the failover of pgpool, I turn off pgpool on node 1 which fails over watchdog to node 2. Then I turn on pgpool on node 1 that set node 1 as a standby node. The next step I turn off pgpool on node 2 which watchdog try’s to fail over to node 3 but watchdog IP never comes up on node 3 or any of the nodes. So I turn off pgpool on node 3 and watchdog fails over to node 1.
> My question is why watchdog doesn’t come up on node 3. Pgpool.conf is set the same on all 3 nodes.
> 
> Here’s my output of show pool_nodes
> 
>  node_id | hostname  | port | status | lb_weight |  role   | select_cnt | load_balance_node | replication_delay | replication_state | replication_sync_state | last_status_change
> 
> ---------+-----------+------+--------+-----------+---------+------------+-------------------+-------------------+-------------------+------------------------+---------------------
> 
>  0       | pgtest-01 | 5432 | up     | 0.500000  | primary | 2003       | true              | 0                 |                   |                        | 2021-08-24 14:06:20
> 
>  1       | pgtest-02 | 5432 | up     | 0.500000  | standby | 667        | false             | 0                 | streaming         | async                  | 2021-08-24 14:06:20
> 
>  2       | pgtest-03 | 5432 | up     | 0.000000  | standby | 0          | false             | 0                 | streaming         | async                  | 2021-08-24 14:06:20
> 
> Not sure if this is an issue but the lb_weight show node 1(pgtest-01) and node 2(pgtest-02) as 0.5000 and node 3(pgtest-03) as 0.0000
> 
> In pgpool.conf I have backend_weight for each node set to 0.3
> 
> Hosts = Ubuntu 20.4
> Pgpool = 4.2.4
> PostgreSQL = 12.8
> 
> 
> -- Wolf
> 
> 


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan
http://www.sraoss.co.jp/


More information about the pgpool-general mailing list