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:06:42Z
Lists: pgsql-hackers
Alvaro Herrera <alvaro.herrera@2ndquadrant.com> writes:
> 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.
Yes, I think this can be useful. For example, an application may wish
to receive the result as soon as possible in case it's used as input
to some further computation.
> PQrequestFlush() or something like that ...
I think I would prefer PQflushResult() or something along these
lines ("request" is easy to misinterpret as "client request").
Commits
-
libpq: Fix sending queries in pipeline aborted state
- ab0967942900 15.0 landed
- 1beaa654da61 14.0 landed
-
Fix libpq state machine in pipeline mode
- b71a9cb31e46 15.0 landed
- 690339fcd587 14.0 landed
-
Add PQsendFlushRequest to libpq
- a7192326c74d 15.0 landed
- 69cf1d5429d4 14.0 landed