pgsql: libpq: Add PQsendPipelineSync()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: libpq: Add PQsendPipelineSync()
Date: 2024-01-16 01:14:04
Message-ID: E1rPY1k-001c93-Cy@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2024-01-16 03:06:33 Re: pgsql: Re-validate connection string in libpqrcv_connect().
Previous Message Michael Paquier 2024-01-16 00:18:46 pgsql: Fix a typo and some doc indentation related to libpq pipeline fu