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

Yugo Nagata nagata at sraoss.co.jp
Wed Jan 4 17:53:54 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_2_STABLE

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

Modified Files
--------------
child.c                | 42 ++++++++++++++----------------------------
pool_connection_pool.c |  6 ++----
pool_process_context.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
pool_process_context.h |  8 ++++++++
4 files changed, 73 insertions(+), 32 deletions(-)



More information about the pgpool-committers mailing list