Re: Drawbacks of using BYTEA for PK? - Mailing list pgsql-general

From David Garamond
Subject Re: Drawbacks of using BYTEA for PK?
Date
Msg-id 40062AAB.400@zara.6.isreserved.com
Whole thread Raw
In response to Re: Drawbacks of using BYTEA for PK?  (Alex Satrapa <alex@lintelsys.com.au>)
List 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


pgsql-general by date:

Previous
From: "LitelWang"
Date:
Subject: about postgres odbc on wondows
Next
From: David Garamond
Date:
Subject: Re: Drawbacks of using BYTEA for PK?