pgsql: Allow running just selected steps of pgbench's initializationse - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Allow running just selected steps of pgbench's initializationse
Date
Msg-id E1eEMSs-0003nY-Aa@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Allow running just selected steps of pgbench's initialization sequence.

This feature caters to specialized use-cases such as running the normal
pgbench scenario with nonstandard indexes, or inserting other actions
between steps of the initialization sequence.  The normal sequence of
initialization actions is broken down into half a dozen steps which can
be executed in a user-specified order, to the extent to which that's
sensible.  The actions themselves aren't changed, except to make them
more robust against nonstandard uses:

* all four tables are now dropped in one DROP command, to reduce
assumptions about what foreign key relationships exist;

* all four tables are now truncated at the start of the data load
step, for consistency;

* the foreign key creation commands now specify constraint names, to
prevent accidentally creating duplicate constraints by executing the
'f' step twice.

Make some cosmetic adjustments in the messages emitted by pgbench
so that it's clear which steps are getting run, and so that the
messages agree with the documented names of the steps.

In passing, fix failure to enforce that the -v option is used only
in benchmarking mode.

Masahiko Sawada, reviewed by Fabien Coelho, editorialized a bit by me

Discussion: https://postgr.es/m/CAD21AoCsz0ZzfCFcxYZ+PUdpkDd5VsCSG0Pre_-K1EgokCDFYA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/591c504fad0de88b559bf28e929d23672179a857

Modified Files
--------------
doc/src/sgml/ref/pgbench.sgml                |  85 ++++++-
src/bin/pgbench/pgbench.c                    | 363 +++++++++++++++++++--------
src/bin/pgbench/t/001_pgbench_with_server.pl |  25 +-
src/bin/pgbench/t/002_pgbench_no_server.pl   |   5 +
4 files changed, 364 insertions(+), 114 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Push target list evaluation through Gather Merge.
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updatedtuple