[pgpool-committers: 6174] Re: pgpool: Fix occasional query hang while processing DEALLOCATE.
Tatsuo Ishii
ishii at sraoss.co.jp
Tue Sep 17 07:43:05 JST 2019
H Usama,
Sorry, the commit was not neccessary for 4.0 or older branches.
The commit has been reverted for those branches.
Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
> Hi Ishii-San
>
> This commit is causing the compilation failure with the below error.
>
> context/pool_query_context.c: In function ‘where_to_send_deallocate’:
> context/pool_query_context.c:1487:17: error: ‘POOL_QUERY_CONTEXT’ has no
> member named ‘load_balance_node_id’
> query_context->load_balance_node_id =
> msg->query_context->load_balance_node_id;
> ^
> context/pool_query_context.c:1487:60: error: ‘POOL_QUERY_CONTEXT’ has no
> member named ‘load_balance_node_id’
> query_context->load_balance_node_id =
> msg->query_context->load_balance_node_id;
>
> Thanks
> Best Regards
> Muhammad Usama
>
>
> On Mon, Sep 16, 2019 at 6:23 AM Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
>
>> 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
>> ------
>> V4_0_STABLE
>>
>> Details
>> -------
>>
>> https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=83c1988d3c8bdd0ecbdf6a3d28371febee556483
>>
>> Modified Files
>> --------------
>> src/context/pool_query_context.c | 9 ++++++---
>> 1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> _______________________________________________
>> pgpool-committers mailing list
>> pgpool-committers at pgpool.net
>> http://www.pgpool.net/mailman/listinfo/pgpool-committers
>>
More information about the pgpool-committers
mailing list