1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

pgbench: Add \syncpipeline

This change adds a new meta-command called \syncpipeline to pgbench,
able to send a sync message without flushing using the new libpq
function PQsendPipelineSync().

This meta-command is available within a block made of \startpipeline and
\endpipeline.

Author: Anthonin Bonnefoy
Discussion: https://postgr.es/m/CAO6_XqpcNhW6LZHLF-2NpPzdTbyMm4-RVkr3+AP5cOKSm9hrWA@mail.gmail.com
This commit is contained in:
Michael Paquier
2024-01-24 16:55:19 +09:00
parent faa2b953ba
commit 94edfe250c
3 changed files with 70 additions and 6 deletions

View File

@ -1386,13 +1386,19 @@ SELECT 4 AS four \; SELECT 5 AS five \aset
<varlistentry id="pgbench-metacommand-pipeline">
<term><literal>\startpipeline</literal></term>
<term><literal>\syncpipeline</literal></term>
<term><literal>\endpipeline</literal></term>
<listitem>
<para>
These commands delimit the start and end of a pipeline of SQL
statements. In pipeline mode, statements are sent to the server
without waiting for the results of previous statements. See
This group of commands implements pipelining of SQL statements.
A pipeline must begin with a <command>\startpipeline</command>
and end with an <command>\endpipeline</command>. In between there
may be any number of <command>\syncpipeline</command> commands,
which sends a <link linkend="protocol-flow-ext-query">sync message</link>
without ending the ongoing pipeline and flushing the send buffer.
In pipeline mode, statements are sent to the server without waiting
for the results of previous statements. See
<xref linkend="libpq-pipeline-mode"/> for more details.
Pipeline mode requires the use of extended query protocol.
</para>