Re: UUID v7

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
Cc: 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>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, 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-04-04 13:45:21
Message-ID: 7dda76c3-4558-4ad0-a934-09d4751adb4e@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 26.03.24 18:26, Andrey M. Borodin wrote:
>> Also, you are initializing 4 bits (I think?) to zero to guard against counter rollovers (so it's really just an 8 bit counter?). But nothing checks against such rollovers, so I don't understand the use of that.
> No, there's only one guard rollover bit.
> Here: uuid->data[6] = (uuid->data[6] & 0xf7);
> Bits that are called "guard bits" do not guard anything, they just ensure counter capacity when it is initialized.

Uh, I guess I don't understand this at all. I tried to dig up some
information about this, but didn't find anything. What exactly is the
mechanism of these "counter rollover guards"? If they don't guard
anything, what are they supposed to accomplish?

In response to

  • Re: UUID v7 at 2024-03-26 17:26:14 from Andrey M. Borodin

Responses

  • Re: UUID v7 at 2024-04-04 18:12:10 from Andrey M. Borodin

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2024-04-04 13:47:50 Re: Streaming read-ready sequential scan code
Previous Message Jelte Fennema-Nio 2024-04-04 13:34:24 Re: Flushing large data immediately in pqcomm