Re: pgsql: Set random seed for pgbench.

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Teodor Sigaev <teodor(at)sigaev(dot)ru>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Set random seed for pgbench.
Date: 2018-03-31 17:43:38
Message-ID: alpine.DEB.2.20.1803311936450.23311@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-03-31 20:29:11 pgsql: Fix assorted issues in parallel vacuumdb.
Previous Message Tom Lane 2018-03-31 16:34:32 Re: pgsql: Set random seed for pgbench.