Re: pgsql: Set random seed for pgbench. - Mailing list pgsql-committers

From Fabien COELHO
Subject Re: pgsql: Set random seed for pgbench.
Date
Msg-id alpine.DEB.2.20.1803311936450.23311@lancre
Whole thread Raw
In response to Re: pgsql: Set random seed for pgbench.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Set random seed for pgbench.
List pgsql-committers
>> I assumed that pg_strong_random is always available,
>
> ... which is wrong.  Every other call of it is wrapped in
> #ifdef HAVE_STRONG_RANDOM, and so must this one be.

Indeed, I clearly misunderstood its usage pattern. I looked at its source 
("src/port/pg_strong_random.c") where the function is always defined and 
is documented as returning false if it does not find a strong random 
source, so I though that checking for this was enough. But indeed its
compilation fails if no source is provided.

Thanks for the fix.

-- 
Fabien.


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Set random seed for pgbench.
Next
From: Tom Lane
Date:
Subject: pgsql: Fix assorted issues in parallel vacuumdb.