<div dir="ltr">Hi Ishii-San<div><br></div><div>This commit is causing the compilation failure with the below error.</div><div><br></div><div><font face="monospace">context/pool_query_context.c: In function ‘where_to_send_deallocate’:<br>context/pool_query_context.c:1487:17: error: ‘POOL_QUERY_CONTEXT’ has no member named ‘load_balance_node_id’<br>    query_context-&gt;load_balance_node_id = msg-&gt;query_context-&gt;load_balance_node_id;<br>                 ^<br>context/pool_query_context.c:1487:60: error: ‘POOL_QUERY_CONTEXT’ has no member named ‘load_balance_node_id’<br>    query_context-&gt;load_balance_node_id = msg-&gt;query_context-&gt;load_balance_node_id;<br></font></div><div><br></div><div>Thanks</div><div>Best Regards</div><div>Muhammad Usama</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 16, 2019 at 6:23 AM Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Fix occasional query hang while processing DEALLOCATE.<br>
<br>
When DEALLOCATE tries to remove a named statement, it inherits<br>
where_to_send map of the named statement in<br>
where_to_send_deallocate(). However it forgot to copy the load balance<br>
node id in the query context of the named statement. This made sending<br>
query to backend not happen: if the target node id is different from<br>
query_context-&gt;load_balance_node_id nor primary node id,<br>
pool_virtual_master_db_node_id (it is called as MASTER_NODE_ID)<br>
returns primary node id, and pool_send_and_wait(MASTER_NODE_ID)<br>
ignores the request because VALID_BACKEND returns false in this case<br>
(MASTER_NODE_ID = primary node id is not in the where_to_send map). As<br>
a result, following check_error() waits for response from backend in<br>
vain.<br>
<br>
Fix is, let where_to_send_deallocate() copy load balance node id from<br>
the query context of the previous named statement.<br>
<br>
Per bug 546.<br>
<br>
Branch<br>
------<br>
V4_0_STABLE<br>
<br>
Details<br>
-------<br>
<a href="https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=83c1988d3c8bdd0ecbdf6a3d28371febee556483" rel="noreferrer" target="_blank">https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=83c1988d3c8bdd0ecbdf6a3d28371febee556483</a><br>
<br>
Modified Files<br>
--------------<br>
src/context/pool_query_context.c | 9 ++++++---<br>
1 file changed, 6 insertions(+), 3 deletions(-)<br>
<br>
_______________________________________________<br>
pgpool-committers mailing list<br>
<a href="mailto:pgpool-committers@pgpool.net" target="_blank">pgpool-committers@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-committers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-committers</a><br>
</blockquote></div>