public inbox for [email protected]
help / color / mirror / Atom feedFrom: David Mullineux <[email protected]>
To: Tom Lane <[email protected]>
Cc: Frédéric Yhuel <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: [email protected]
Subject: Re: Has gen_random_uuid() gotten much slower in v17?
Date: Tue, 26 Nov 2024 15:23:43 +0000
Message-ID: <CAGsyd8W8oB5YqcDB=BUUn32XWGbt8x0UYO_WAJHFGcgX076tXg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAGsyd8XBE7Ksq2Z75CTStrjSswOjVUE8S+i7qq1hGvYRj+_bcA@mail.gmail.com>
<[email protected]>
<CAGsyd8VBW+zwYuLEiJ3JC5NCFveumUiwhJQoS_-zvhnyfARcbQ@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAGsyd8XhEahQab+3wj_tH+WVhZQxqAix=vr3SuDaganSQEk4ZQ@mail.gmail.com>
<[email protected]>
On Wed, 20 Nov 2024, 22:26 Tom Lane, <[email protected]> wrote:
> [ please don't top-quote, it makes the conversation hard to follow ]
>
> David Mullineux <[email protected]> writes:
> > On Wed, 20 Nov 2024, 15:46 Tom Lane, <[email protected]> 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
view thread (8+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Has gen_random_uuid() gotten much slower in v17?
In-Reply-To: <CAGsyd8W8oB5YqcDB=BUUn32XWGbt8x0UYO_WAJHFGcgX076tXg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox