Re: GUID for postgreSQL

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: GUID for postgreSQL
Date: 2005-07-28 18:35:37
Message-ID: 60hdeezsli.fsf@dba2.int.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

chris(at)travelamericas(dot)com (Chris Travers) writes:
>>At least on Windows, the GUID is derived in part from the computers
>>primary MAC address. No, it's not a guarantee, but it's pretty unlikely
>>:-)

> The danger is not that the MAC address will be duplicated, but that
> other factors will lead to an MD5 collision.

What factors?

The 'random' portion comes _in addition to_ location information and a
timestamp, so that for there to be a collision, you need to be
generating thousands of GUIDs *per millisecond* on a given host.

> Unless you can show me that there is a 1:1 correspondence of all
> possible unique factors going into the GUID generation and the output,
> then I will say it is still no guarantee.

Read the RFC (4122). It shows how it works.

> So you could use the Mac address of the machine, I guess, if you
> wanted to....

That is one option; section 4.3 of the RFC suggests an alternative
that is also likely to work.
--
(format nil "~S(at)~S" "cbbrowne" "acm.org")
http://www.ntlug.org/~cbbrowne/sap.html
Rules of the Evil Overlord #78. "I will not tell my Legions of Terror
"And he must be taken alive!" The command will be: ``And try to take
him alive if it is reasonably practical.''"
<http://www.eviloverlord.com/>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2005-07-28 18:40:30 Re: Megabytes of stats saved after every connection
Previous Message Chris Browne 2005-07-28 18:31:59 Re: GUID for postgreSQL