Re: Pipeline mode and PQpipelineSync()

Alvaro Herrera <alvaro.herrera@2ndquadrant.com>

From: Alvaro Herrera <alvaro.herrera@2ndquadrant.com>
To: Boris Kolpackov <boris@codesynthesis.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-06-25T23:50:10Z
Lists: pgsql-hackers

Attachments

On 2021-Jun-24, Boris Kolpackov wrote:

> Boris Kolpackov <boris@codesynthesis.com> writes:
> 
> > What's strange here is that the first PQgetResult() call (marked with ???)
> > returns NULL instead of result for INSERT #1 as in the first call sequence.
> 
> I've hit another similar case except now an unexpected NULL result is
> returned in the middle of PGRES_PIPELINE_ABORTED result sequence. The
> call sequence is as follows:

I haven't been able to get this to break for me yet, and I probably
won't today.  In the meantime, here's patches for the first one.  The
test added by 0003 fails, and then 0004 fixes it.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W

Commits

  1. libpq: Fix sending queries in pipeline aborted state

  2. Fix libpq state machine in pipeline mode

  3. Add PQsendFlushRequest to libpq