Add PQsendFlushRequest to libpq
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 29 Jun 2021 18:37:39 +0000 (14:37 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 29 Jun 2021 18:37:39 +0000 (14:37 -0400)
commit69cf1d5429d48d030d71d5dd4931084d422413cb
tree3aa4550ae7a78b3563fc5a780024b7ff73839839
parentf8b51464c265696c1eab1c896bddc797beb9a13c
Add PQsendFlushRequest to libpq

This new libpq function allows the application to send an 'H' message,
which instructs the server to flush its outgoing buffer.

This hasn't been needed so far because the Sync message already requests
a buffer; and I failed to realize that this was needed in pipeline mode
because PQpipelineSync also causes the buffer to be flushed.  However,
sometimes it is useful to request a flush without establishing a
synchronization point.

Backpatch to 14, where pipeline mode was introduced in libpq.

Reported-by: Boris Kolpackov <boris@codesynthesis.com>
Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/202106252350.t76x73nt643j@alvherre.pgsql
doc/src/sgml/libpq.sgml
src/interfaces/libpq/exports.txt
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/libpq-fe.h