Re: rebooting a standby causes it go down on pgpool side

From: Luca Ferrari <fluca1978(at)gmail(dot)com>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: pgpool-general(at)lists(dot)postgresql(dot)org
Subject: Re: rebooting a standby causes it go down on pgpool side
Date: 2025-11-06 08:06:11
Message-ID: CAKoxK+5D5EZvqW13Eh3rM+S_trbTF9W7LVFFD4u3ox=WyymLuA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-general

On Tue, Nov 4, 2025 at 3:32 AM Tatsuo Ishii <ishii(at)postgresql(dot)org> wrote:
>
> From the official document:
> "2 - Node is up. Connections are pooled."
> https://www.pgpool.net/docs/latest/en/html/pcp-node-info.html
>
> So you can safely assume that "waiting" also meabs node is up (for
> pgpool). To change the status from "waiting" to "up", you can issue
> any SQL command (for example show pool_nodes") to pgpool.
>

Thanks, it is clear now!

> I think what happens there is, pgpool's health check detects
> PostgreSQL on pg3 goes down and trigger failover on pg3 pgpool. As
> stated somewhere in the official docs, pgpool automatically sets
> PostgreSQL to down status, but not automatically change the status to
> up (or waiting). This is not a bug. It's by design. If you want to
> make the status to up automatically, please consider using
> auto_failback.

Thanks, I was not assuming it was a bug, only asking for confirmation
about this behavior.

>
> If you want to avoid the failover, you can tweak the health check
> parameters so that while PostgreSQL rebooting, the health check
> repeatedly retries. For example, increase health_check_max_retries.
> Note that health_check parameters can be changed by reloading
> pgpool.conf. So you can change the parameter and restore to previous
> value without rebooting pgpool.

Definetely a choice, but on the other hand increasing the number of
retries will make pgpool unable to "quickly" catch a real failover, so
I guess it is better, in my case, to deal with the "down" status after
a reboot.

Thanks,
Luca

In response to

Browse pgpool-general by date

  From Date Subject
Next Message Koshino Taiki 2025-11-25 09:34:13 Pgpool-II 4.6.4, 4.5.9, 4.4.14, 4.3.17 and 4.2.24 are now officially released.
Previous Message Tatsuo Ishii 2025-11-04 02:32:19 Re: rebooting a standby causes it go down on pgpool side