pgsql: pgbench: Add --continue-on-error option.

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pgbench: Add --continue-on-error option.
Date: 2025-11-07 10:20:09
Message-ID: E1vHJZh-005R7k-19@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pgbench: Add --continue-on-error option.

This commit adds the --continue-on-error option, allowing pgbench clients
to continue running even when SQL statements fail for reasons other than
serialization or deadlock errors. Without this option (by default),
the clients aborts in such cases, which was the only available behavior
previously.

This option is useful for benchmarks using custom scripts that may
raise errors, such as unique constraint violations, where users want
pgbench to complete the run despite individual statement failures.

Author: Rintaro Ikeda <ikedarintarof(at)oss(dot)nttdata(dot)com>
Co-authored-by: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Co-authored-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Reviewed-by: Stepan Neretin <slpmcf(at)gmail(dot)com>
Reviewed-by: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Reviewed-by: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Reviewed-by: Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>
Reviewed-by: Hayato Kuroda <kuroda(dot)hayato(at)fujitsu(dot)com>
Reviewed-by: Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>
Reviewed-by: Chao Li <lic(at)highgo(dot)com>
Discussion: https://postgr.es/m/44334231a4d214fac382a69cceb7d9fc@oss.nttdata.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0ab208fa505c04e2b3483de53a73edb71f9b9106

Modified Files
--------------
doc/src/sgml/ref/pgbench.sgml | 65 ++++++++++++---
src/bin/pgbench/pgbench.c | 117 ++++++++++++++++++++++-----
src/bin/pgbench/t/001_pgbench_with_server.pl | 22 +++++
3 files changed, 171 insertions(+), 33 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2025-11-07 14:27:42 pgsql: doc: Fix incorrect wording for --file in pg_dump
Previous Message Peter Eisentraut 2025-11-07 09:34:54 pgsql: Fix "inconsistent DLL linkage" warning on Windows MSVC