This is a discussion on Re: [PATCHES] Patch for UUID datatype (beta) within the pgsql Hackers forums, part of the PostgreSQL category; --> > > > > Anyone who thinks UUIDs are guaranteed unique has been drinking too much > > of ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| > > > > 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. |
| |||
| On Mon, Sep 18, 2006 at 05:29:34PM +0200, Harald Armin Massa wrote: > 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" The code to get things like the MAC address is going to be a pile of very OS specific code, which I really don't think is in the realm of code postgresql wants to maintain. The easier and better solution is to include a module in contrib (at best) that calls some standard cross-platform library to do the job. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFFDsESIB7bNG8LQkwRAmcCAJwKa7Jb07fT3lzdp1aRJ8 Eym+lFmACcDF3K RoqOIeIFu8v+4XzCBNbgTaM= =WMbU -----END PGP SIGNATURE----- |
| ||||
| "Harald Armin Massa" <haraldarminmassa@gmail.com> writes: > 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. MAC addresses are not guaranteed unique (heck, on Apple machines they're user-assignable, and I think you can change 'em on Linux too). Another unrelated-to-reality assumption in the above claim is that the local system clock is always accurate (is never, say, set backwards). You can have a reasonably strong probability that UUIDs generated per spec within a single well-run network are unique, but that's about as far as I'd care to believe it. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| Thread Tools | |
| Display Modes | |
|
|