Michael Paquier <michael@paquier.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