Re: UUID v7

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, pgsql-hackers mailing list <pgsql-hackers(at)postgresql(dot)org>, Sergey Prokhorenko <sergeyprokhorenko(at)yahoo(dot)com(dot)au>, Przemysław Sztoch <przemyslaw(at)sztoch(dot)pl>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Mat Arye <mat(at)timescaledb(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>, Junwang Zhao <zhjwpku(at)gmail(dot)com>
Subject: Re: UUID v7
Date: 2024-03-21 15:21:15
Message-ID: CAGECzQQFA5U7LTW_bE-vEcWFfVYcU-vk7ip-2dmQf+ekJzPOTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 20 Mar 2024 at 19:08, Andrey M. Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
> Timer-based bits contribute to global sortability. But the real timers we have are not even millisecond adjusted. We can hope for ~few ms variation in one datacenter or in presence of atomic clocks.

I think the main benefit of using microseconds would not be
sortability between servers, but sortability between backends. With
the current counter approach between backends we only have sortability
at the millisecond level.

However, I don't really think it is incredibly important to get the
"perfect" approach to filling in rand_a/rand_b right now. As long as
we don't document what we do, we can choose to change the method
without breaking backwards compatibility. Because either approach
results in valid UUIDv7s.

In response to

  • Re: UUID v7 at 2024-03-20 18:08:09 from Andrey M. Borodin

Responses

  • Re: UUID v7 at 2024-03-22 06:53:51 from Andrey M. Borodin
  • Re: UUID v7 at 2024-03-22 12:51:14 from Peter Eisentraut

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthias van de Meent 2024-03-21 15:21:20 Re: 13dev failed assert: comparetup_index_btree(): ItemPointer values should never be equal
Previous Message Nathan Bossart 2024-03-21 15:20:32 Re: An improved README experience for PostgreSQL