]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Abort pgbench if script end is reached with an open pipeline
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 22 Jan 2024 16:48:30 +0000 (17:48 +0100)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 22 Jan 2024 16:48:30 +0000 (17:48 +0100)
commit07b53de700390c8bdee99ce373d84f0cdcad74d6
tree9bb2e58309cd5115c129190f1e3f04c57ee613fe
parent74f770ef202fd3f1f1d1f0889f04c16440d23bd0
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
src/bin/pgbench/pgbench.c
src/bin/pgbench/t/001_pgbench_with_server.pl