[pgpool-committers: 2744] pgpool: Fix bug reported in bug#145.

Tatsuo Ishii ishii at postgresql.org
Fri Oct 16 18:23:51 JST 2015


Fix bug reported in bug#145.

The problem occurs when all the condition below are met:

1) pgpool-II 3.4 or later
2) streaming replication mode
3) primary node is also load balance node
4) extended protocol is used
5) client_idle_limit reached

After the extended protocol query finished, the client stays idle. When
client_idle_limit is reached, reset_query_list() is called to send
reset query but it is only sent to the primary node. CommandComplete
message is returned from the primary node. Because
doing_extended_query_message flag remains on, ProcessBackendResponse()
happily resets query_in_progress flag. The ReadyForQuery message
arrives and pgpool-II tries to read the message not only from the
primary but the standby because there's no query context (remember that
the query_in_progress flags is off). Since the standby did not receive
the reset query, it does not respond and pgpool-II hangs here.

The fix is, resetting doing_extended_query_message flag in
reset_query_list().

Note that pgpool-II 3.3 or before does not have the problem since it
disconnects connections to backend right after client_idle_limit is
reached.

Branch
------
master

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

Modified Files
--------------
src/protocol/pool_process_query.c |    5 +++++
1 file changed, 5 insertions(+)



More information about the pgpool-committers mailing list