From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pgbench: introduce a RandomState struct
Date: Fri, 16 Nov 2018 19:35:58 +0000
Message-ID: <E1gNjuI-0001YZ-9v@gemulon.postgresql.org> (raw)
pgbench: introduce a RandomState struct
This becomes useful when used to retry a transaction after a
serialization error or deadlock abort. (We don't yet have that feature,
but this is preparation for it.)
While at it, use separate random state for thread administratrivia such
as deciding which script to run, how long to delay for throttling, or
whether to log a message when sampling; this not only makes these tasks
independent of each other, but makes the actual thread run
deterministic.
Author: Marina Polyakova
Reviewed-by: Fabien Coelho
Discussion: https://postgr.es/m/72a0d590d6ba06f242d75c2e641820ec@postgrespro.ru
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/409231919443984635b7ae9b7e2e261ab984eb1e
Modified Files
--------------
src/bin/pgbench/pgbench.c | 106 ++++++++++++++++++++++++++++++++--------------
1 file changed, 74 insertions(+), 32 deletions(-)
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: alvherre@alvh.no-ip.org
Subject: Re: pgsql: pgbench: introduce a RandomState struct
In-Reply-To: <E1gNjuI-0001YZ-9v@gemulon.postgresql.org>
References: <E1gNjuI-0001YZ-9v@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