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
Date: 2021-06-24T09:10:41Z
Lists: pgsql-hackers
Alvaro Herrera <alvaro.herrera@2ndquadrant.com> writes:

> Subject: [PATCH] Clarify that pipeline sync is mandatory
> 
> ---
>  doc/src/sgml/libpq.sgml | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
> index 441cc0da3a..0217f8d8c7 100644
> --- a/doc/src/sgml/libpq.sgml
> +++ b/doc/src/sgml/libpq.sgml
> @@ -5103,10 +5103,12 @@ int PQflush(PGconn *conn);
>       The server executes statements, and returns results, in the order the
>       client sends them.  The server will begin executing the commands in the
>       pipeline immediately, not waiting for the end of the pipeline.
> +     Do note that results are buffered on the server side; a synchronization
> +     point, establshied with <function>PQpipelineSync</function>, is necessary
> +     in order for all results to be flushed to the client.

s/establshied/established/

Otherwise, LGTM, thanks!



Commits

  1. libpq: Fix sending queries in pipeline aborted state

  2. Fix libpq state machine in pipeline mode

  3. Add PQsendFlushRequest to libpq