Re: [HACKERS] pgbench randomness initialization
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Chapman Flack <chap@anastigmatix.net>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
Robert Haas <robertmhaas@gmail.com>,
Andres Freund <andres@anarazel.de>,
PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2018-02-28T23:01:55Z
Lists: pgsql-hackers
Fabien COELHO <coelho@cri.ensmp.fr> writes: >> 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. Hm ... so I tried to replicate this problem, and failed to: the log files get made under the VPATH build directory, as desired, even without this patch. Am I doing something wrong, or is this platform-dependent somehow? regards, tom lane
Commits
-
Set random seed for pgbench.
- 64f85894ad27 11.0 landed
-
Fix pgbench TAP test to work in VPATH builds.
- e94f2bc809a0 11.0 landed