pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Abort pgbench if script end is reached with an open pipeline
Date: Mon, 22 Jan 2024 16:50:37 +0000
Message-ID: <E1rRxVN-002bso-2m@gemulon.postgresql.org> (raw)

Abort pgbench if script end is reached with an open pipeline

When a pipeline is opened with \startpipeline and not closed, pgbench
will either error on the next transaction with a "already in pipeline
mode" error or successfully end if this was the last transaction --
despite not sending anything that was piped in the pipeline.

Make it an error to reach end of script is reached while there's an
open pipeline.

Backpatch to 14, where pgbench got support for pipelines.

Author: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Reported-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/Za4IObZkDjrO4TcS@paquier.xyz

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/85ecff891525d61bc975584e2dc2d3c01e5a48ee

Modified Files
--------------
src/bin/pgbench/pgbench.c                    | 15 +++++++++++++--
src/bin/pgbench/t/001_pgbench_with_server.pl | 28 ++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 2 deletions(-)



view thread (4+ messages)  latest in thread

Message-ID: <E1rRxVN-002bso-2m@gemulon.postgresql.org>
Permalink:  ../E1rRxVN-002bso-2m@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rRxVN-002bso-2m@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Abort pgbench if script end is reached with an open pipeline
  In-Reply-To: <E1rRxVN-002bso-2m@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox