Re: Re: 7.2 items - Mailing list pgsql-hackers

From Franck Martin
Subject Re: Re: 7.2 items
Date
Msg-id 3AFFBB03.7B6340D1@sopac.org
Whole thread Raw
In response to RE: Re: 7.2 items  (Franck Martin <Franck@sopac.org>)
Responses Re: Re: 7.2 items
List pgsql-hackers
Hannu Krosing wrote:

> Franck Martin wrote:
> >
> > I think OID should be truly unique in the world as to make it easier for
> > replication. If OID are real unique number (not in a table, not in a
> > database, but in the world) then replication can be easily built with
> > OIDs...
> >
>
> Exactly! That is what the Mariposa project did - they made OIDs uniqe
> and
> consisting of 32bit site id + 32bit local OID. I guess this could be
> split
> some other way too, like 20 bit site id + 44bit local or any other.
>
> IMHO the best would be a scheme of 32bit site id + 32bit local, but each
> site can get additional site ids from some central (for a supersite)
> table
> when it sees that it is near runnig out of oids.
>
> -----------------------
> Hannu

As I'm thinking about it there is a utility called uuidgen which generates
such numbers.

On my Mandrake distro it is part of the e2fsprogs package. Orbit uses it to
generate unique numbers too.

--------------
The  uuidgen  program creates a new universally unique identifier (UUID)
using the libuuid(3)      library.  The new UUID can reasonably be considered unique among all
UUIDs  created  on  the      local system, and among UUIDs created on other systems in the past and
in the future.
      There  are two types of UUID's which uuidgen can generate: time-based
UUID's and random-based      UUID's.  By default uuidgen will generate a random-based UUID if a
high-quality random number      generator  is  present.  Otherwise, it will chose a time-based UUID.
It is possible to force      the generation of one of these two UUID types by using the -r or -t
options.
The   UUID   of   the   form   1b4e28ba-2fa1-11d2-883f-b9a761bde3fb   (in
printf(3)  format      "%08x-%04x-%04x-%04x-%012x") is output to the standard output.
-------------------

Cheers.
Franck@sopac.org



pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Updating system catalogs after a tuple deletion
Next
From: mlw
Date:
Subject: Re: 7.2 items