Re: UUID v7 - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: UUID v7
Date
Msg-id CAAhFRxj6Guh+_u+H7L_=VAJ5aeFTfH6Brb4OtCqu04xVHj29dg@mail.gmail.com
Whole thread Raw
In response to Re: UUID v7  (Jelte Fennema <postgres@jeltef.nl>)
Responses Re: UUID v7
List pgsql-hackers
On Mon, Oct 9, 2023 at 11:11 PM Jelte Fennema <postgres@jeltef.nl> wrote:
>
> I think using `now()` is quite prone to sequence rollover. With the
> current patch inserting more than 2^18~=0.26M rows into a table with
> `gen_uuid_v7()` as the default in a single transaction would already
> cause sequence rollover.

Well, the current patch will just use now()+1ms when 2^18 is
exhausted. Even if now() would be passed as an argument (however
current patch does not support an argument).

Best regards, Andrey Borodin.



pgsql-hackers by date:

Previous
From: Brad Peabody
Date:
Subject: Re: UUID v7
Next
From: Laurenz Albe
Date:
Subject: Re: Fix output of zero privileges in psql