[pgpool-hackers: 4182] Re: failover_on_backend_shutdown not working
Tatsuo Ishii
ishii at sraoss.co.jp
Sat Jul 30 11:50:15 JST 2022
> I am upgrading my PgPool setup from version 4.2.2 to 4.3.2.
>
> I was testing the new parameter that this version introduces - failover_on_backend_shutdown, but it doesn’t seem to work.
>
> My setup is 1 PgPool (4.3.2), 1 primary postgres, 2 replica postgres (all 12.5).
>
> Initially, failover_on_backend_shutdown was turned on, then I turned it off from the config file and did a reload of PgPool.
>
> The option is shown correctly when I query it in runtime:
>
> postgres=# pgpool show failover_on_backend_shutdown;
> failover_on_backend_shutdown
> ------------------------------
> off
> (1 row)
>
> postgres=# show pool_version;
> pool_version
> -----------------------
> 4.3.2 (tamahomeboshi)
> (1 row)
>
> But then I tried turning off the primary instance by using systemctl stop ag_test_01
>
> PgPool recognises that the node has been shutdown with an administrative command but continues to perform a failover anyway.
>
> Please see the logs below (the logs are for node 0 and 2, node 1 was turned off earlier and showed the same behaviour):
> 2022-07-29 08:51:13 psql [592] LOG: reading and processing packets
> 2022-07-29 08:51:13 psql [592] DETAIL: postmaster on DB node 0 was shutdown by administrative command
> 2022-07-29 08:51:13 psql [592] LOCATION: pool_process_query.c:4898
This itself did not trigger the failover, as expected.
> 2022-07-29 08:51:13 psql [592] LOG: pool_ssl: "SSL_read": "no SSL error reported"
> 2022-07-29 08:51:13 psql [592] LOCATION: pool_ssl.c:420
The failover was triggered here. Pgpool-II child process tried to
connect to node 0 but failed. You can set failover_on_backend_error
to off to avoid the failover.
Best reagards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
More information about the pgpool-hackers
mailing list