Re: Using PQexecQuery in pipeline mode produces unexpected Close messages

From: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: "Kyotaro Horiguchi" <horikyota(dot)ntt(at)gmail(dot)com>
Cc: daniele(dot)varrazzo(at)gmail(dot)com, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Using PQexecQuery in pipeline mode produces unexpected Close messages
Date: 2022-06-13 11:09:48
Message-ID: cbddf6bf-aa06-47fa-ab1d-d73a58d4e89f@www.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Fri, Jun 10, 2022, at 8:25 AM, Kyotaro Horiguchi wrote:
>
> The current implement of PQsendQueryInternal looks like the result of
> a misunderstanding of the doc. In the regression tests, that path is
> excercised only for an error case, where no CloseComplete comes.
>
> The attached adds a test for the normal-path of pipelined
> PQsendQuery() to simple_pipeline test then modifies that function not
> to send Close message. Without the fix, the test fails by "unexpected
> notice" even if the trace matches the "expected" content.

Hah, the patch I wrote is almost identical to yours, down to the notice processor counting the number of notices received. The only difference is that I put my test in pipeline_abort.

Sadly, it looks like I won't be able to get this patched pushed for 14.4.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Onur Tirtir 2022-06-13 14:13:16 DELETE deletes more than one rows when LIMIT is used in the USING clause
Previous Message Erik Rijkers 2022-06-13 10:41:35 Re: Unable to make use of "deep" JSONB index

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2022-06-13 11:27:35 Re: pltcl crash on recent macOS
Previous Message r.takahashi_2@fujitsu.com 2022-06-13 11:02:40 RE: Multi-Master Logical Replication