Re: Pipeline mode and PQpipelineSync()

Boris Kolpackov <boris@codesynthesis.com>

From: Boris Kolpackov <boris@codesynthesis.com>
To: Alvaro Herrera <alvaro.herrera@2ndquadrant.com>
Cc: pgsql-hackers@lists.postgresql.org, Michael Paquier <michael@paquier.xyz>, Andrew Dunstan <andrew@dunslane.net>, Peter Geoghegan <pg@bowt.ie>
Date: 2021-07-08T18:31:32Z
Lists: pgsql-hackers
Alvaro Herrera <alvaro.herrera@2ndquadrant.com> writes:

> To be honest, I am hesitant to changing the charter in that way; I fear
> it may have consequences I don't foresee.  I think the workaround is not
> *that* bad.

Ok, fair enough. I've updated my code to account for this and it seems
to be working fine now.


> I'm having a bit of trouble documenting this.  I modified the paragraph in the
> pipeline mode docs to read:
> 
>     <para>
>      <function>PQisBusy</function>, <function>PQconsumeInput</function>, etc
>      operate as normal when processing pipeline results.  Note that if no
>      queries are pending receipt of the corresponding results,
>      <function>PQisBusy</function> returns 0.
>     </para>

How about the following for the second sentence:

"In particular, a call to <function>PQisBusy</function> in the middle
of a pipeline returns 0 if all the results for queries issued so far
have been consumed."



Commits

  1. libpq: Fix sending queries in pipeline aborted state

  2. Fix libpq state machine in pipeline mode

  3. Add PQsendFlushRequest to libpq