Re: UUID v7

From: Andres Freund <andres(at)anarazel(dot)de>
To: Andrey Borodin <amborodin86(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, brad(at)peabody(dot)io, wolakk(at)gmail(dot)com, kydavis(at)cisco(dot)com, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
Subject: Re: UUID v7
Date: 2023-02-11 01:14:53
Message-ID: 20230211011453.uq2yopunpbovcbnn@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2023-02-10 15:57:50 -0800, Andrey Borodin wrote:
> As you may know there's a new version of UUID being standardized [0].
> These new algorithms of UUID generation are very promising for
> database performance.

I agree it's very useful to have.

> [0] https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-04

That looks to not be the current version anymore, it's superseded by:
https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis

> It keeps data locality for time-ordered values.
> From my POV v7 is especially needed for users. Current standard status
> is "draft". And I'm not sure it will be accepted before our feature
> freeze for PG16. Maybe we could provide a draft implementation in 16
> and adjust it to the accepted version if the standard is changed? PFA
> patch with implementation.

Hm. It seems somewhat worrisome to claim something is a v7 UUID when it might
turn out to not be one.

Perhaps we should name the function something like
gen_time_ordered_random_uuid() instead? That gives us a bit more flexibility
about what uuid version we generate. And it might be easier for users, anyway.

Still not sure what version we'd best use for now. Perhaps v8?

Greetings,

Andres Freund

In response to

  • UUID v7 at 2023-02-10 23:57:50 from Andrey Borodin

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-02-11 01:18:36 Re: UUID v7
Previous Message Jeff Davis 2023-02-11 00:17:00 Re: Move defaults toward ICU in 16?