Re: BUG #17358: While using --with-uuid=bsd option, uuid_ossp test fails on NetBSD 9.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: byavuz81(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17358: While using --with-uuid=bsd option, uuid_ossp test fails on NetBSD 9.2
Date: 2022-01-08 21:25:31
Message-ID: 1588971.1641677131@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2022-01-08 15:35:33 -0500, Tom Lane wrote:
>> (I think v1 UUID uniqueness is snake-oil anyway, so I'm just thinking of
>> choosing a random "clock sequence" in each process and calling it good.)

> Hm. Not so sure about that... If we go there, why don't we just rip out the
> ability to create v1 UUIDs?

Well, maybe. Just considering having our own generator already puts us
in a state of sin, because the whole argument for v1 UUID uniqueness
hinges on there being just one generator per machine (or per MAC
address, anyway). As soon as there are independent generators using
the same MAC address, they can't positively guarantee uniqueness.
My thought about it is that once you've crossed that boundary, allowing
each process to generate UUIDs independently is not much of a leap.

And, of course, the reason that the whole thing is snake oil is that
global uniqueness of MAC addresses is a fiction. I think it probably
was from the get-go, but in these days of MAC addresses being just
made up on the fly, it certainly is. (Need I mention macaddr8, and
the lack of space for it in v1 UUIDs?)

So maybe what we should really do is follow the lead of NetBSD
(and OpenBSD too, it seems) and just desupport v1 UUID. That
still leaves us with two alternatives: throw error, or silently
hand back a v4 UUID instead, as they're doing.

But I don't especially like that, because v4 UUIDs are pretty
index-unfriendly, more so than v1 anyway. I'd rather continue
to support v1 to the extent we can practically do so.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-01-09 00:38:41 Re: BUG #17358: While using --with-uuid=bsd option, uuid_ossp test fails on NetBSD 9.2
Previous Message Andres Freund 2022-01-08 20:45:28 Re: BUG #17358: While using --with-uuid=bsd option, uuid_ossp test fails on NetBSD 9.2