Re: Re: 7.2 items

From: Franck Martin <franck(at)sopac(dot)org>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: "'Lincoln Yeoh'" <lyeoh(at)pop(dot)jaring(dot)my>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: 7.2 items
Date: 2001-05-14 11:01:23
Message-ID: 3AFFBB03.7B6340D1@sopac.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sopac(dot)org

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mlw 2001-05-14 12:43:27 Re: 7.2 items
Previous Message Kovacs Zoltan 2001-05-14 09:52:38 Re: bug in PLPGSQL