Re: [HACKERS] pgbench randomness initialization

2018-03-02 Thread Tom Lane
Fabien COELHO writes: >> 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? > As I recall, it

Re: [HACKERS] pgbench randomness initialization

2018-02-28 Thread Fabien COELHO
Hello Tom, Fabien COELHO 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

Re: [HACKERS] pgbench randomness initialization

2018-02-28 Thread Tom Lane
Fabien COELHO 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

Re: Re: [HACKERS] pgbench randomness initialization

2018-01-18 Thread Fabien COELHO
Here is a rebase, plus some more changes: I have improved the error message to tell from where the value was provided. I have removed the test to the exact values produced from the expression test run. I have added a test which run from the same seed value several times and checks that the

Re: Re: [HACKERS] pgbench randomness initialization

2018-01-10 Thread Fabien COELHO
Here is a rebase, plus some more changes: I have improved the error message to tell from where the value was provided. I have removed the test to the exact values produced from the expression test run. I have added a test which run from the same seed value several times and checks that

Re: Re: [HACKERS] pgbench randomness initialization

2018-01-10 Thread Fabien COELHO
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

Re: Re: [HACKERS] pgbench randomness initialization

2018-01-09 Thread Fabien COELHO
Hello Chapman, Thanks for the review, The tests assume that stdlib random/srandom behavior is standard thus deterministic between platform. Is the behavior of srandom() and the system generator really so precisely specified that seed 5432 will produce the same values hardcoded in the tests

Re: Re: [HACKERS] pgbench randomness initialization

2018-01-09 Thread Chapman Flack
On 01/02/18 05:57, Fabien COELHO wrote: >> Here is a new version which output use used seed when a seed is >> explicitely set with an option or from the environment. 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

Re: [HACKERS] pgbench randomness initialization

2018-01-02 Thread Fabien COELHO
Here is a new version which output use used seed when a seed is explicitely set with an option or from the environment. It is even better without xml typos, with simpler coding and the doc in the right place... Sorry for the noise. -- Fabien.diff --git a/doc/src/sgml/ref/pgbench.sgml

Re: [HACKERS] pgbench randomness initialization

2018-01-02 Thread Fabien COELHO
Hello Alvaro, I revive this patch because controlling the seed is useful for tap testing pgbench. 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