[pgpool-general: 7671] Re: Executing failover on backend when stopping a standby node

Tatsuo Ishii ishii at sraoss.co.jp
Tue Aug 17 16:00:35 JST 2021

> Health check is enabled:


> 2) The failover should not continue for long time like a few
>> minutes. For some reason I don't know your failover process takes
>> longer. Have you enabled watchdog? Or do you have special failover
>> command which could take long time?
> I have  a bash script which connects to the backend and execute a failover
> running the repmgr command:
>  ============================================================================
> #------------------------------------------------------------------------------
> #------------------------------------------------------------------------------
> failover_command = '/usr/local/bin/pgpool-failover.sh %d %h %P %m %H %R'
> failback_command = 'echo failback %d %h %p %D %m %H %M %P'
> failover_on_backend_error = on
> detach_false_primary = off
> search_primary_node_timeout = 5min
> ============================================================================
> Anyway, I did not counted the failover duration (and this is not a problem
> now), the point is that a failover should not be performed in this case.

I am not familiar with repmgr and I don't know what's going on when
repmgr is executed. You may want to try without repmgr to see if the
black period becomes shorter.

Anyway if pgpool detects backend failure by either health check or
something (for example, pgpool fails to connect to backend), pgpool
will start failover process. You cannot avoid this.
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php

More information about the pgpool-general mailing list