On Wed, 20 Nov 2024, 22:26 Tom Lane, <t...@sss.pgh.pa.us> wrote:

> [ please don't top-quote, it makes the conversation hard to follow ]
>
> David Mullineux <dmu...@gmail.com> writes:
> > On Wed, 20 Nov 2024, 15:46 Tom Lane, <t...@sss.pgh.pa.us> wrote:
> >> Yeah.  Also, are you building with openssl, or not?
>
> > No, not at all!
>
> If you're not using openssl, then gen_random_uuid basically devolves
> to a read of /dev/urandom.  Maybe you're using a different kernel
> than before, and it has different properties around that?
>
>                         regards, tom lane
>

Just to say, thanks Tom. You were dead right. From the code in
pg_strong_random.c
it looks like each call will do an open("/dev/urandom")

And that cannot be fast.

Not sure why,but I guess there are good reasons to not keep a file
descriptor to that device open across calls ?

Thanks anyway

Reply via email to