libpq: Add PQsendPipelineSync()
authorMichael Paquier
Tue, 16 Jan 2024 01:13:42 +0000 (10:13 +0900)
committerMichael Paquier
Tue, 16 Jan 2024 01:13:42 +0000 (10:13 +0900)
commit4794c2d31714235700ed68edafa10d1928c9bbb2
tree4ead26663e9ae6eb6e6d195880bc5a7dd950e4c1
parent83eb244e419efd43959fdd544ff8c30e175565ef
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
doc/src/sgml/libpq.sgml
src/interfaces/libpq/exports.txt
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/libpq-fe.h
src/test/modules/libpq_pipeline/libpq_pipeline.c
src/test/modules/libpq_pipeline/traces/multi_pipelines.trace