Re: Drawbacks of using BYTEA for PK?

David Garamond <lists@zara.6.isreserved.com>

From: David Garamond <lists@zara.6.isreserved.com>
To: pgsql-general@postgresql.org
Date: 2004-01-15T05:52:43Z
Lists: pgsql-general
Alex Satrapa wrote:
> David Garamond wrote:
> 
>> Remember that /sbin/ifconfig output usually include MAC address too. 
>> Not that MAC addresses are 100% unique, but that should increase the 
>> uniqueness.
> 
> How do you increase uniqueness?  Either a value is unique or it isn't - 

Ok, let's say "mathematically unique" and "practically unique". I was 
referring to the second one.

> if you've got multiple hosts on the network with the same network 
> address, you're in big trouble!
> 
> 32 bits for an IP address is a huge number space... but why you'd really 
> need that much space as a base for your GUID is beyond me.

The point of using /sbin/ifconfig output (and then hashing it to get a 
128bit number) is because the output contains MAC address and IP 
address. IP addresses are not unique, particularly in intranet or 
clustering situation. MAC addresses are more likely to be unique, but 
I've heard stories about cheap ethernet cards having duplicate MAC's, 
and beside in many cases MAC addresses can be altered by software.

The probability of both MAC and IP address (and other strings in 
/sbin/ifconfig output) being totally the same for two hosts is of course 
much smaller, and thus the term "increase [the practical] uniqueness."

-- 
dave