[pgpool-hackers: 4206] Deal with idle_session_timeout

Tatsuo Ishii ishii at sraoss.co.jp
Wed Oct 26 14:14:47 JST 2022


Hi,

I have found an issue with idle_session_timeout which was introduced
in PostgreSQL 14.0.  If this parameter is enabled in postgresql.conf
and the timeout fires, Pgpool-II triggers failover if
failover_on_backend_error is on (the default). This is not good.

This is a similar issue fixed in:
https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=3f5986eee360f12e6a0bb77aa46f95abf5f6bc10
In the commit we dealt with idle-in-transaction timeout.

Attached patch fixes the issue in the same direction as the commit
above: add detect_idle_session_timeout_error() to detect the error
code for idle_session_timeout. If the error is detected, Pgpool-II
returns the error code to frondend as a fatal error and disconnects
the session.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: idle_session_timeout.patch
Type: text/x-patch
Size: 3171 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20221026/046e5f33/attachment.bin>


More information about the pgpool-hackers mailing list