Re: [PATCHES] Patch for UUID datatype (beta)

From: "Harald Armin Massa" <haraldarminmassa(at)gmail(dot)com>
To: "Gevik Babakhani" <pgdev(at)xs4all(dot)nl>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] Patch for UUID datatype (beta)
Date: 2006-09-18 15:29:34
Message-ID: 7be3f35d0609180829u568ecd38sad599945fc6e1491@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

>
>
> > Anyone who thinks UUIDs are guaranteed unique has been drinking too much
> > of the kool-aid.
>

> Identifier uniqueness considerations:
> This document specifies three algorithms to generate UUIDs: the
> first leverages the unique values of 802 MAC addresses to
> guarantee uniqueness, the second uses pseudo-random number
> generators, and the third uses cryptographic hashing and
> application-provided text strings. As a result, the UUIDs
> generated according to the mechanisms here will be unique from all
> other UUIDs that have been or will be assigned.

That is a quote from the ftp://ftp.rfc-editor.org/in-notes/rfc4122.txt

And to quote ITU-T
"""
If generated according to one of the mechanisms defined in ITU-T Rec. X.667
| ISO/IEC 9834-8 <http://fpweb/ITU-T/studygroups/com17/oid.html>, a UUID is
either guaranteed to be different from all other UUIDs generated before 3603
A.D., or is extremely likely to be different (depending on the mechanism
chosen). The UUID generation algorithm specified in this standard supports
very high allocation rates: 10 million per second per machine if necessary,
so UUIDs can also be used as transaction IDs.
"""

They also talk about a "guaranteed differentness" - and as much as I
understand, they are Unique as long as the MAC-Adresses of the Network-Cards
are unique, and fall back to "extremly likely" when there is no network card
present.

I would really like PostgreSQL to include an uuid-generation function
crafted along the recommendations in rfc4122 or ISO/IEC 9834-8; so those
UUIDs have a "ISO/IEC-defined uniqueness" or at least a "ISO/IEC-defined
extreme likelyness to be unique"

As of now there are at least 3 implementations for UUID creation for
PostgreSQL in the wild; as much as I understand is that "UUIDs created by
the same algorithm" are much more likely to be unique to each other then
UUIDs created by different algorithms.

Harald

--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Let's set so double the killer delete select all.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2006-09-18 15:30:50 Re: Limited Sort
Previous Message Albe Laurenz 2006-09-18 15:27:05 Re: [PATCHES] Linking on AIX (Was: Fix linking of OpenLDAP libraries )

Browse pgsql-patches by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-09-18 15:53:54 Re: [PATCHES] Patch for UUID datatype (beta)
Previous Message Gevik Babakhani 2006-09-18 15:14:22 Re: Patch for UUID datatype (beta)