[pgpool-committers: 3744] pgpool: Fix connection_life_time broken by authentication_timeout

Yugo Nagata nagata at sraoss.co.jp
Wed Jan 4 14:46:50 JST 2017


Fix connection_life_time broken by authentication_timeout

When authentication_timeout is enabled,
connection_life_time could never be expired, because
alarm(0) is called at reading start-up packet.

When there only one connection pool is used, this
problem doesn't occur because the signal handler
for connection_life_time is always set at the end
of the session. However, if more than one connection
pools exist, the handler isn't set but only the time
to colse the connection is calculated.

To fix it, when authentication_timeout is enabled,
save the signal handler for conneciont_life_time
and the remaining time, and undo the handler when
authentication_timeout is disabled.

Branch
------
V3_6_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=bd92a118d8d38ac4c94dbe43f90927963a834877

Modified Files
--------------
src/context/pool_process_context.c         | 49 ++++++++++++++++++++++++++++++
src/include/context/pool_process_context.h |  8 +++++
src/protocol/child.c                       |  6 ++--
src/protocol/pool_connection_pool.c        |  6 ++--
4 files changed, 61 insertions(+), 8 deletions(-)



More information about the pgpool-committers mailing list