Re: UUID v7
От | Andrey M. Borodin |
---|---|
Тема | Re: UUID v7 |
Дата | |
Msg-id | 5819C3A4-C438-4F61-B7F6-0CB37FAE434F@yandex-team.ru обсуждение исходный текст |
Ответ на | Re: UUID v7 (Junwang Zhao <zhjwpku@gmail.com>) |
Ответы |
Re: UUID v7
|
Список | pgsql-hackers |
> On 5 Nov 2024, at 23:56, Andrey M. Borodin <x4mmm@yandex-team.ru> wrote: > > <v30-0001-Implement-UUID-v7.patch> Some more thoughts on this patch version: 0. Comment mentioning nanoseconds, while we do not need to carry anything /* Convert TimestampTz back and carry nanoseconds. */ 1. There's unnecessary &3 in uuid->data[7] = uuid->data[7] | ((uuid->data[8] >> 6) & 3); 2. Currently we store 0..999 microseconds in 10 bits, so values 1000..1023 are unused. We could use them for overflow. Thatwould slightly increase non-overflowing capacity when generating more than million UUIDs per second on one backend. However,given current performance of our CSPRNG I do not think this feature worth code complexity. Best regards, Andrey Borodin.
В списке pgsql-hackers по дате отправления: