Re: UUID v7 - Mailing list pgsql-hackers

From Andrey M. Borodin
Subject Re: UUID v7
Date
Msg-id DDCB0776-9597-4195-97CE-BCE3BF9B166A@yandex-team.ru
Whole thread Raw
In response to Re: UUID v7  ("Andrey M. Borodin" <x4mmm@yandex-team.ru>)
List pgsql-hackers

> On 16 Oct 2024, at 11:05, Michael Paquier <michael@paquier.xyz> wrote:
>
> This part of the patch looks structurally wrong to me because we've
> already spent some time refactoring the clock APIs into instr_time.h
> that deals about cross-platform requirements for monotonic times.
> Particularly, on MacOS, we have CLOCK_MONOTONIC_RAW, and your patch
> does not use it.  So you should avoid calling these routines, and
> build something using the interface unified across the board, like
> anywhere else.  And you know, duplication.

Thanks for looking!
Actually, CLOCK_MONOTONIC_RAW on MacOS was exactly a problem: this clocks have nothing to do with astronomic clock. And
wemust put real UTC time into UUID. 
I’d be happy to reuse instr_time.h infrastructure, but it just does not fit for the purpose. It’s optimized to measure
timespans. 


Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Add “FOR UPDATE NOWAIT” lock details to the log.
Next
From: Fujii Masao
Date:
Subject: Re: Doc: shared_memory_size_in_huge_pages with the "SHOW" command.