Thread: pgsql: libpq: Add PQsendPipelineSync()

pgsql: libpq: Add PQsendPipelineSync()

From
Michael Paquier
Date:
libpq: Add PQsendPipelineSync()

This new function is equivalent to PQpipelineSync(), except that it does
not flush anything to the server except if the size threshold of the
output buffer is reached; the user must subsequently call PQflush()
instead.

Its purpose is to reduce the system call overhead of pipeline mode, by
giving to applications more control over the timing of the flushes when
manipulating commands in pipeline mode.

Author: Anton Kirilov
Reviewed-by: Jelte Fennema-Nio, Robert Haas, Álvaro Herrera, Denis
Laxalde, Michael Paquier
Discussion: https://postgr.es/m/CACV6eE5arHFZEA717=iKEa_OewpVFfWJOmsOdGrqqsr8CJVfWQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4794c2d31714235700ed68edafa10d1928c9bbb2

Modified Files
--------------
doc/src/sgml/libpq.sgml                            | 45 +++++++++++++++---
src/interfaces/libpq/exports.txt                   |  1 +
src/interfaces/libpq/fe-exec.c                     | 54 ++++++++++++++++++----
src/interfaces/libpq/libpq-fe.h                    |  1 +
src/test/modules/libpq_pipeline/libpq_pipeline.c   | 43 +++++++++++++++++
.../libpq_pipeline/traces/multi_pipelines.trace    | 11 +++++
6 files changed, 138 insertions(+), 17 deletions(-)