Re: Using PQexecQuery in pipeline mode produces unexpected Close messages

Kyotaro Horiguchi <horikyota.ntt@gmail.com>

From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: alvherre@alvh.no-ip.org
Cc: daniele.varrazzo@gmail.com, pgsql-hackers@lists.postgresql.org
Date: 2022-06-10T06:33:36Z
Lists: pgsql-bugs, pgsql-hackers
At Fri, 10 Jun 2022 15:25:44 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
> 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.

And, as a matter of course, this fix should be back-patched to 14.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Commits

  1. 001_libpq_pipeline.pl: use Test::Differences if available

  2. libpq: Improve idle state handling in pipeline mode