Re: [HACKERS] Patch for UUID datatype (beta)

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: mark(at)mark(dot)mielke(dot)cc
Cc: "Jim C(dot) Nasby" <jimn(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, Gevik Babakhani <pgdev(at)xs4all(dot)nl>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Patch for UUID datatype (beta)
Date: 2006-09-20 03:21:51
Message-ID: 20060920032151.GF31466@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

mark(at)mark(dot)mielke(dot)cc wrote:
> On Tue, Sep 19, 2006 at 08:20:13AM -0500, Jim C. Nasby wrote:
> > On Mon, Sep 18, 2006 at 07:45:07PM -0400, mark(at)mark(dot)mielke(dot)cc wrote:
> > > I would not use a 100% random number generator for a UUID value as was
> > > suggested. I prefer inserting the MAC address and the time, to at
> > > least allow me to control if a collision is possible. This is not easy
> > > to do using a few lines of C code. I'd rather have a UUID type in core
> > > with no generation routine, than no UUID type in core because the code
> > > is too complicated to maintain, or not portable enough.
> > As others have mentioned, using MAC address doesn't remove the
> > possibility of a collision.
>
> It does, as I control the MAC address.

What happens if you have two postmaster running on the same machine?

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2006-09-20 03:28:02 Fwd: docs for advisory locks
Previous Message Naz Gassiep 2006-09-20 02:15:43 Re: vista

Browse pgsql-patches by date

  From Date Subject
Next Message Merlin Moncure 2006-09-20 03:28:02 Fwd: docs for advisory locks
Previous Message Bruce Momjian 2006-09-20 02:10:31 Re: Dynamic linking on AIX