Re: Pipeline mode and PQpipelineSync() - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Pipeline mode and PQpipelineSync()
Date
Msg-id 202106231622.ppuztv2vegix@alvherre.pgsql
Whole thread Raw
In response to Re: Pipeline mode and PQpipelineSync()  (Boris Kolpackov <boris@codesynthesis.com>)
Responses Re: Pipeline mode and PQpipelineSync()
List pgsql-hackers
On 2021-Jun-23, Boris Kolpackov wrote:

> I think one change that is definitely needed is to make it clear that
> the PQpipelineSync() call is not optional.
> 
> I would also add a note saying that while the server starts processing
> the pipeline immediately, it may buffer the results and the only way
> to flush them out is to call PQpipelineSync().

Curious -- I just noticed that the server understands a message 'H' that
requests a flush of the server buffer.  However, libpq has no way to
generate that message as far as I can see.  I think you could use that
to request results from the pipeline, without the sync point.

I wonder if it's worth adding an entry point to libpq to allow access to
this.  PQrequestFlush() or something like that ... Prior to pipeline
mode this has no use (since everything ends with ReadyForQuery which
involves a flush) but it does seem to have use in pipeline mode.

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



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Using indexUnchanged with nbtree
Next
From: Simon Riggs
Date:
Subject: Re: Using indexUnchanged with nbtree