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

shacky shacky83 at gmail.com
Tue Aug 17 15:17:55 JST 2021


Thanks Tatsuo!

Il giorno mar 17 ago 2021 alle ore 06:40 Tatsuo Ishii <ishii at sraoss.co.jp>
ha scritto:

> Strange. In this case Pgpool-II does not restart Pgpool-II child
> process and clients will not notice failover happened.
>

Yes, this is what I expect!


> 1) You do not enable health check. In this case new clients will
> receive the error you mentioned.
>

Health check is enabled:
============================================================================
#------------------------------------------------------------------------------
# HEALTH CHECK GLOBAL PARAMETERS
#------------------------------------------------------------------------------

health_check_period = 10
health_check_timeout = 10
health_check_user = 'hc'
health_check_password = 'password'
health_check_database = 'postgres'
health_check_max_retries = 3
health_check_retry_delay = 1
connect_timeout = 10000
 ============================================================================

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 AND FAILBACK
#------------------------------------------------------------------------------

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.

Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20210817/d29bed8d/attachment.htm>


More information about the pgpool-general mailing list