Re: UUID v7 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: UUID v7
Date
Msg-id 7dda76c3-4558-4ad0-a934-09d4751adb4e@eisentraut.org
Whole thread Raw
In response to Re: UUID v7  ("Andrey M. Borodin" <x4mmm@yandex-team.ru>)
Responses Re: UUID v7
List 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
bitcounter?).  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?




pgsql-hackers by date:

Previous
From: Jelte Fennema-Nio
Date:
Subject: Re: Flushing large data immediately in pqcomm
Next
From: Melanie Plageman
Date:
Subject: Re: Streaming read-ready sequential scan code