Re: pgsql: Set random seed for pgbench.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, 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 16:13:03
Message-ID: 19794.1522599183@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Michael Paquier <michael(at)paquier(dot)xyz> writes:
> 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.

I don't really see the point of doing more work than we've done there.
No modern platform should be without pg_strong_random, and if you've
actually had to use --disable-strong-random, it will not be astonishing
that you lose some functionality.

Also, while I personally do not see a use-case why somebody would need
cryptographically strong random seeds in pgbench, if somebody did need
that then they wouldn't thank us for silently falling back to a
not-strong generation method if the platform is misconfigured somehow.

regards, tom lane

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2018-04-01 17:59:36 Re: pgsql: Portability fix for commit 9a895462d.
Previous Message Michael Paquier 2018-04-01 07:22:08 Re: pgsql: Set random seed for pgbench.