[ please don't top-quote, it makes the conversation hard to follow ]
David Mullineux <dmullx@gmail.com> writes: > On Wed, 20 Nov 2024, 15:46 Tom Lane, <tgl@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 ?