Re: pgbench randomness initialization

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@anarazel.de>, PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2016-04-07T15:51:32Z
Lists: pgsql-hackers
Fabien COELHO wrote:

> While testing it I had a funny pattern, something like:
> 
>   pgbench --random-seed=123 -M prepared -T 3 -P 1 -S
>   1.0: 600 tps
>   2.0: 600 tps
>   3.0: 600 tps

The output should include the random seed used, whether it was passed
with --random-seed, environment variable or randomly determined.  That
way, the user that later wants to verify why a particular run caused
some particular misbehavior knows what seed to use to reproduce that
run.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Commits

  1. Set random seed for pgbench.

  2. Fix pgbench TAP test to work in VPATH builds.