Re: UUID column as pimrary key?

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
Cc: Bill Moran <wmoran(at)potentialtech(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: UUID column as pimrary key?
Date: 2011-01-05 22:49:01
Message-ID: 4D24F55D.8070409@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 01/05/2011 03:39 PM, Alban Hertroys wrote:
>>> From wikipedia, "only after generating 1 billion UUIDs every second for
>> the next 100 years, the probability of creating just one duplicate would
>> be about 50%. The probability of one duplicate would be about 50% if
>> every person on earth owns 600 million UUIDs."
>
>
> Even if the chances of one person encountering a UUID collision are about once in say 100 billion years, that could be tomorrow. It could also not happen at all in that time span. That's how chance works. You can never assume it won't happen. If the costs incurred by a collision are lower than the costs of preventing it, you can choose to just take the hit, but that doesn't go for _every_ problem domain. The medical systems mentioned up-thread are an example of that.
>
> Next to that, UUID's are generated by computers. I have no doubts that the numeric space that makes up a UUID allows for collision chances as low as described, but are computers capable of generating those numbers sufficiently random that they actually achieve that low a chance? I think that's pushing it.
>
> Alban Hertroys
>
> --
> If you can't see the forest for the trees,
> cut the trees and you'll see there is no forest.
>
>
> !DSPAM:1214,4d24f31711541026711723!
>
>
I'm not talking about chance. I'm talking about robust software. You
have to expect some sort of rollback for any of a number of reasons and
deal with them. The potential UUID collision is just one example of a
contingency one might plan for after having taken care of all the more
probable failure points.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Satterwhite 2011-01-05 23:11:35 Re: UUID column as pimrary key?
Previous Message Alban Hertroys 2011-01-05 22:39:09 Re: UUID column as pimrary key?