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