From: | David Mullineux <dmullx(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Frédéric Yhuel <frederic(dot)yhuel(at)dalibo(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-performance(at)lists(dot)postgresql(dot)org |
Subject: | Re: Has gen_random_uuid() gotten much slower in v17? |
Date: | 2024-11-26 15:23:43 |
Message-ID: | CAGsyd8W8oB5YqcDB=BUUn32XWGbt8x0UYO_WAJHFGcgX076tXg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Wed, 20 Nov 2024, 22:26 Tom Lane, <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> [ please don't top-quote, it makes the conversation hard to follow ]
>
> David Mullineux <dmullx(at)gmail(dot)com> writes:
> > On Wed, 20 Nov 2024, 15:46 Tom Lane, <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Sajjad Abid | 2024-11-27 04:14:36 | Reg. Postgres Unique contraint |
Previous Message | Pavel Stehule | 2024-11-26 06:21:49 | Re: proposal: schema variables |