Re: GUID for postgreSQL - Mailing list pgsql-general

From Chris Browne
Subject Re: GUID for postgreSQL
Date
Msg-id 60hdeezsli.fsf@dba2.int.libertyrms.com
Whole thread Raw
In response to Re: GUID for postgreSQL  ("Magnus Hagander" <mha@sollentuna.net>)
List pgsql-general
chris@travelamericas.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@~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/>

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Megabytes of stats saved after every connection
Next
From: Chris Browne
Date:
Subject: Re: GUID for postgreSQL