[pgpool-committers: 6161] pgpool: Fix occasional query hang while processing DEALLOCATE.

Tatsuo Ishii ishii at sraoss.co.jp
Mon Sep 16 10:23:25 JST 2019


Fix occasional query hang while processing DEALLOCATE.

When DEALLOCATE tries to remove a named statement, it inherits
where_to_send map of the named statement in
where_to_send_deallocate(). However it forgot to copy the load balance
node id in the query context of the named statement. This made sending
query to backend not happen: if the target node id is different from
query_context->load_balance_node_id nor primary node id,
pool_virtual_master_db_node_id (it is called as MASTER_NODE_ID)
returns primary node id, and pool_send_and_wait(MASTER_NODE_ID)
ignores the request because VALID_BACKEND returns false in this case
(MASTER_NODE_ID = primary node id is not in the where_to_send map). As
a result, following check_error() waits for response from backend in
vain.

Fix is, let where_to_send_deallocate() copy load balance node id from
the query context of the previous named statement.

Per bug 546.

Branch
------
V3_7_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=8925e047fb42ae758966efa8eade47f6f8fbc41c

Modified Files
--------------
src/context/pool_query_context.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)



More information about the pgpool-committers mailing list