pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Allow running just selected steps of pgbench's initialization se
Date: Mon, 13 Nov 2017 21:40:22 +0000
Message-ID: <E1eEMSs-0003nY-Aa@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1eEMSs-0003nY-Aa@gemulon.postgresql.org>
Permalink:  ../E1eEMSs-0003nY-Aa@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eEMSs-0003nY-Aa@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Allow running just selected steps of pgbench's initialization se
  In-Reply-To: <E1eEMSs-0003nY-Aa@gemulon.postgresql.org>
  References: <E1eEMSs-0003nY-Aa@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