From:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To:
Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
Cc:
Bill Moran <wmoran(at)potentialtech(dot)com>, Radosław Smogura <rsmogura(at)softperience(dot)eu>, PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject:
Re: UUID column as pimrary key?
Date:
2011-01-05 16:01:52
Message-ID:
1466.1294243312@sss.pgh.pa.us (view raw or flat )
Thread:
2011-01-04 19:07:00 from Dennis Gearon <gearond(at)sbcglobal(dot)net>
2011-01-04 19:16:52 from David Wall <d(dot)wall(at)computer(dot)org>
2011-01-04 21:11:14 from Chris Browne <cbbrowne(at)acm(dot)org>
2011-01-04 19:24:30 from "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
2011-01-05 08:31:51 from Radosław Smogura <rsmogura(at)softperience(dot)eu>
2011-01-05 10:50:11 from Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
2011-01-05 14:28:40 from Radosław Smogura <rsmogura(at)softperience(dot)eu>
2011-01-05 14:34:00 from Szymon Guz <mabewlun(at)gmail(dot)com>
2011-01-05 14:55:26 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-05 19:40:59 from Dennis Gearon <gearond(at)sbcglobal(dot)net>
2011-01-05 14:37:18 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-05 14:55:53 from Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
2011-01-05 15:03:12 from Mike Christensen <mike(at)kitchenpc(dot)com>
2011-01-05 15:06:16 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-05 16:46:27 from Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
2011-01-05 15:04:45 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-05 15:05:29 from Bill Moran <wmoran(at)potentialtech(dot)com>
2011-01-05 15:21:49 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-05 15:55:22 from Bill Moran <wmoran(at)potentialtech(dot)com>
2011-01-05 16:03:47 from Rob Sargent <robjsargent(at)gmail(dot)com>
2011-01-05 18:57:59 from Bill Moran <wmoran(at)potentialtech(dot)com>
2011-01-05 19:58:12 from Rob Sargent <robjsargent(at)gmail(dot)com>
2011-01-05 20:43:01 from Bill Moran <wmoran(at)potentialtech(dot)com>
2011-01-05 21:12:26 from Rob Sargent <robjsargent(at)gmail(dot)com>
2011-01-06 16:22:18 from Anthony <osm(at)inbox(dot)org>
2011-01-05 22:39:09 from Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
2011-01-05 22:49:01 from Rob Sargent <robjsargent(at)gmail(dot)com>
2011-01-05 23:27:55 from Chris Browne <cbbrowne(at)acm(dot)org>
2011-01-06 08:02:43 from Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
2011-01-06 08:52:15 from Stuart Bishop <stuart(at)stuartbishop(dot)net>
2011-01-06 14:29:48 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-06 15:14:00 from Bill Moran <wmoran(at)potentialtech(dot)com>
2011-01-06 15:46:59 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-06 15:55:38 from Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
2011-01-06 16:51:25 from Chris Browne <cbbrowne(at)acm(dot)org>
2011-01-06 18:33:05 from Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
2011-01-06 19:36:21 from Chris Browne <cbbrowne(at)acm(dot)org>
2011-01-06 20:39:34 from Bill Moran <wmoran(at)potentialtech(dot)com>
2011-01-06 22:06:55 from Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
2011-01-08 10:48:24 from Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
2011-01-06 18:24:06 from Bill Moran <wmoran(at)potentialtech(dot)com>
2011-01-06 20:01:01 from "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
2011-01-05 16:18:37 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-05 19:03:24 from Bill Moran <wmoran(at)potentialtech(dot)com>
2011-01-05 19:41:43 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-05 20:13:27 from Raymond O'Donnell <rod(at)iol(dot)ie>
2011-01-05 20:14:37 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-05 22:03:12 from Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
2011-01-05 23:11:35 from Michael Satterwhite <michael(at)weblore(dot)com>
2011-01-05 23:44:40 from Radosław Smogura <rsmogura(at)softperience(dot)eu>
2011-01-06 02:46:18 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-06 05:30:45 from Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
2011-01-06 15:19:14 from Michael Satterwhite <michael(at)weblore(dot)com>
2011-01-06 15:59:56 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-05 23:22:08 from Chris Browne <cbbrowne(at)acm(dot)org>
2011-01-06 03:23:26 from Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
2011-01-06 02:44:29 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-06 03:26:50 from Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
2011-01-05 23:32:58 from dennis jenkins <dennis(dot)jenkins(dot)75(at)gmail(dot)com>
2011-01-05 23:47:44 from Szymon Guz <mabewlun(at)gmail(dot)com>
2011-01-06 16:31:38 from Chris Browne <cbbrowne(at)acm(dot)org>
2011-01-06 17:09:15 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-05 16:01:52 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-01-05 16:29:59 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-05 16:57:45 from Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
2011-01-05 17:30:42 from Radosław Smogura <rsmogura(at)softperience(dot)eu>
2011-01-05 17:48:37 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-06 09:51:03 from Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
2011-01-06 14:28:04 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-05 16:19:22 from Leif Biberg Kristensen <leif(at)solumslekt(dot)org>
2011-01-05 16:33:51 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
2011-01-05 18:31:37 from Radosław Smogura <mail(at)smogura(dot)eu>
2011-01-05 19:31:55 from Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
Lists:
pgsql-general
Scott Ribe <scott_ribe(at)elevated-dev(dot)com> writes:
> On Jan 5, 2011, at 8:05 AM, Bill Moran wrote:
>> Beyond that, the namespace size for a UUID is so incomprehensibly huge
>> that the chance of two randomly generated UUIDs having the same value
>> is incomprehensibly unlikely
> Yes, as in: it is *far* more likely that all of your team members and all of your client contacts will be simultaneously struck by lightning and killed in their sleep, and it is *far* more likely that all life on earth will be wiped out by an asteroid impact,
I see those sorts of arguments all the time, and I consider them pure BS.
Yes, the namespace is theoretically large. However, the questions you
really have to answer are (a) how much of the namespace is actually
being used by the UUID generation methods in use in a particular
application; (b) how sure can you be that there is not correlation
between UUIDs generated in different places/sessions.
In practical use I think the odds of a collision are *far* higher than
you are suggesting, unless the UUID generation is being done with a lot
more care than is likely if the user takes these sorts of claims at face
value. The odds may still be low enough to be a very good risk, but
you need to think about it not just bet your database on it without
thinking.
Being paranoid is a good thing. It's what DBAs are paid for.
regards, tom lane
In response to
Responses
pgsql-general by date
Next :From: Rob SargentDate: 2011-01-05 16:03:47
Subject : Re: UUID column as pimrary key?
Previous :From : Bill MoranDate : 2011-01-05 15:55:22
Subject : Re: UUID column as pimrary key?