From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-04-01 07:22:08 |
Message-ID: | 20180401072208.GB2211@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Sat, Mar 31, 2018 at 07:43:38PM +0200, Fabien COELHO wrote:
> 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.
I have not check in details this thread so I may be saying something
stupid... But if you are looking for a frontend implementation for
strong randoms, please extract pg_frontend_random in fe-auth-scram.c and
move it to its own file for example in src/common as a frontend-only
file. When working on SCRAM, I recall mentioning that but Heikki has
kept the code in its current shape for simplicity.
As far as I can see, there is no reason to issue an error in
set_random_seed() either in pgbench code.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-04-01 16:13:03 | Re: pgsql: Set random seed for pgbench. |
Previous Message | Andres Freund | 2018-04-01 03:30:29 | pgsql: Fix non-portable use of round(). |