Re: 9.4 Proposal: Initdb creates a single table - Mailing list pgsql-hackers

From Tom Lane
Subject Re: 9.4 Proposal: Initdb creates a single table
Date
Msg-id 3123.1398361526@sss.pgh.pa.us
Whole thread Raw
In response to Re: 9.4 Proposal: Initdb creates a single table  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: 9.4 Proposal: Initdb creates a single table
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Oh, I think I see your point: it's that no matter what we do here, there
> would be no way to guarantee that a value we generate does not collide
> with any other value elsewhere (either on other uuidserial columns, or
> on other servers).

Not that way, anyway.

> Because if it is, then I think the problem is that the UUID concept
> might be flawed yet users still want to use it, and we do no service by
> refusing to provide it on those grounds.

My point is a bit more subtle than that.  It's perfectly reasonable to
want a universally-unique identifier in some applications.  The problem
is that there is no perfect implementation, and so people really need
to stop and think about which generator algorithm they're going to use
and whether its particular failure modes are acceptable in their
context.  So I'm not eager to provide some "easy to use" API that
encourages users to believe that no thought is required on their part.

Having said that, though, the argument around whether such facilities
belong in core seems to devolve to whether you want to buy into
maintaining libuuid for ourselves (in fact worse than that: it's not clear
that libuuid ever has worked on all our platforms, so we might be buying
into some up-front porting work too).  As Josh notes, we may be forced
into that anyway if we don't want to walk away from contrib/uuid-ossp.
But first I'd like to see a bit more research into what the alternatives
might be...
        regards, tom lane



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: UUIDs in core WAS: 9.4 Proposal: Initdb creates a single table
Next
From: Christopher Browne
Date:
Subject: Re: UUIDs in core WAS: 9.4 Proposal: Initdb creates a single table