Re: UUID v7

From: Nikolay Samokhvalov <nik(at)postgres(dot)ai>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, pgsql-hackers mailing list <pgsql-hackers(at)postgresql(dot)org>, Przemysław Sztoch <przemyslaw(at)sztoch(dot)pl>, Sergey Prokhorenko <sergeyprokhorenko(at)yahoo(dot)com(dot)au>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Nick Babadzhanian <pgnickb(at)gmail(dot)com>, Mat Arye <mat(at)timescaledb(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>, "Kyzer Davis (kydavis)" <kydavis(at)cisco(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, "brad(at)peabody(dot)io" <brad(at)peabody(dot)io>, Kirk Wolak <wolakk(at)gmail(dot)com>
Subject: Re: UUID v7
Date: 2024-01-22 04:22:19
Message-ID: CAM527d__3qQxvpUC_5tWW5TeodE=bivYT3eNDpjrVAk3-uU0TA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 19, 2024 at 10:07 AM Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
wrote:

>
>
> > On 19 Jan 2024, at 13:25, Andrey Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
> >
> > Also, I've added some documentation on all functions.
>
> Here's v12. Changes:
> 1. Documentation improvements
> 2. Code comments
> 3. Better commit message and reviews list
>

Thank you, Andrey! I have just checked v12 – cleanly applied to HEAD, and
functions work well. I especially like that fact that we keep
uuid_extract_time(..) here – this is a great thing to have for time-based
partitioning, and in many cases we will be able to decide not to have a
creation column timestamp (e.g., "created_at") at all, saving 8 bytes.

The docs and comments look great too.

Overall, the patch looks mature enough. It would be great to have it in
pg17. Yes, the RFC is not fully finalized yet, but it's very close. And
many libraries are already including implementation of UUIDv7 – here are
some examples:

- https://www.npmjs.com/package/uuidv7
- https://crates.io/crates/uuidv7
- https://github.com/google/uuid/pull/139

Nik

In response to

  • Re: UUID v7 at 2024-01-19 18:07:35 from Andrey Borodin

Responses

  • Re: UUID v7 at 2024-01-22 04:24:31 from Nikolay Samokhvalov
  • Re: UUID v7 at 2024-01-22 15:02:34 from Aleksander Alekseev
  • Re: UUID v7 at 2024-01-24 21:49:45 from Sergey Prokhorenko

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikolay Samokhvalov 2024-01-22 04:24:31 Re: UUID v7
Previous Message Amit Kapila 2024-01-22 04:19:26 Re: Synchronizing slots from primary to standby