Re: Using PQexecQuery in pipeline mode produces unexpected Close messages - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: Using PQexecQuery in pipeline mode produces unexpected Close messages
Date
Msg-id cbddf6bf-aa06-47fa-ab1d-d73a58d4e89f@www.fastmail.com
Whole thread Raw
In response to Re: Using PQexecQuery in pipeline mode produces unexpected Close messages  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Responses Re: Using PQexecQuery in pipeline mode produces unexpected Close messages
List 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.


pgsql-hackers by date:

Previous
From: "r.takahashi_2@fujitsu.com"
Date:
Subject: RE: Multi-Master Logical Replication
Next
From: Thomas Munro
Date:
Subject: Re: pltcl crash on recent macOS