Re: Support getrandom() for pg_strong_random() source - Mailing list pgsql-hackers

From Jacob Champion
Subject Re: Support getrandom() for pg_strong_random() source
Date
Msg-id CAOYmi+kYYEuX3R_fVyVOnCU1-Rt_j2wzE6sF2O6VvQPdKHcT-Q@mail.gmail.com
Whole thread Raw
In response to Re: Support getrandom() for pg_strong_random() source  (Masahiko Sawada <sawada.mshk@gmail.com>)
Responses Re: Support getrandom() for pg_strong_random() source
List pgsql-hackers
On Thu, Oct 9, 2025 at 4:53 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> Does it mean that we introduce something like pg_fast_random() and
> packagers can select it as the random number generation function
> instead of pg_strong_random()? Or can packagers select the function
> used in pg_strong_random()?

The latter -- packagers should be able to select the implementation of
pg_strong_random(). I think pg_fast_random() is likely to be a bad
abstraction if we don't have more use cases to guide it.

> All of these sound reasonable to me. I think we can handle this as two
> separate discussions: one for the UUID implementation changes, and
> another for the pg_strong_random() modifications (which would cover
> both the runtime switching for superusers and the compile-time
> alternatives for packagers).

Sounds good to me. (Which would you like this thread to be?)

--Jacob



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Support getrandom() for pg_strong_random() source
Next
From: Michael Paquier
Date:
Subject: Re: Replace O_EXCL with O_TRUNC for creation of state.tmp in SaveSlotToPath