Re: UUID v7

From: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Sergey Prokhorenko <sergeyprokhorenko(at)yahoo(dot)com(dot)au>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, pgsql-hackers mailing list <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org>, 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-10-18 05:35:16
Message-ID: DDCB0776-9597-4195-97CE-BCE3BF9B166A@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 16 Oct 2024, at 11:05, Michael Paquier <michael(at)paquier(dot)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 we must 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 time spans.

Best regards, Andrey Borodin.

In response to

  • Re: UUID v7 at 2024-10-16 06:05:27 from Michael Paquier

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2024-10-18 05:45:41 Re: ECPG Refactor: move sqlca variable in ecpg_log()
Previous Message Fujii Masao 2024-10-18 04:58:19 Re: Add “FOR UPDATE NOWAIT” lock details to the log.