pgsql: Allow running just selected steps of pgbench's initialization se

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Allow running just selected steps of pgbench's initialization se
Date: 2017-11-13 21:40:22
Message-ID: E1eEMSs-0003nY-Aa@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2017-11-14 00:32:51 Re: [COMMITTERS] pgsql: Add hash partitioning.
Previous Message Robert Haas 2017-11-13 21:38:01 pgsql: Push target list evaluation through Gather Merge.