Re: Re: [HACKERS] pgbench randomness initialization

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Chapman Flack <chap@anastigmatix.net>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@anarazel.de>, PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2018-01-10T10:00:24Z
Lists: pgsql-hackers

Attachments

> This is a simple patch that does what it says on the tin. I ran into
> trouble with the pgbench TAP test *even before applying the patch*, but
> only because I was doing a VPATH build as a user without 'write'
> on the source tree (001_pgbench_with_server.pl tried to make pgbench
> create log files there). Bad me. Oddly, that was the only test in the
> whole tree to have such an issue, so here I add a pre-patch to fix that.
> Now my review needs a review. :)

Yep. I find the multiple chdir solution a little bit too extreme.

ISTM that it should rather add the correct path to --log-prefix by 
prepending $node->basedir, like the pgbench function does for -f scripts.

See attached.

-- 
Fabien.

Commits

  1. Set random seed for pgbench.

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