Re: UUID v7 - Mailing list pgsql-hackers

From Andrey M. Borodin
Subject Re: UUID v7
Date
Msg-id E964723F-754E-49C3-AA4C-61C6B3836029@yandex-team.ru
Whole thread Raw
In response to Re: UUID v7  ("Andrey M. Borodin" <x4mmm@yandex-team.ru>)
List pgsql-hackers

> On 3 May 2024, at 11:18, Andrey M. Borodin <x4mmm@yandex-team.ru> wrote:
>

Here's the documentation from ClickHouse [0] for their implementation. It's identical to provided patch in this thread,
withfew notable exceptions: 

1. Counter is 42 bits, not 18. The counter have no guard bits, every bit is initialized with random number on time
ticks.
2. By default counter is shared between threads. Alternative function generateUUIDv7ThreadMonotonic() provides
thread-localcounter. 

Thanks!


Best regards, Andrey Borodin.

[0] https://clickhouse.com/docs/en/sql-reference/functions/uuid-functions#generateUUIDv7


pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Proposal for CREATE OR REPLACE EVENT TRIGGER in PostgreSQL
Next
From: Daniel Gustafsson
Date:
Subject: Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?