Re: OID Usage

From: Bo Lorentsen <bl(at)netgroup(dot)dk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: OID Usage
Date: 2005-01-14 18:58:25
Message-ID: 41E81651.1020900@netgroup.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:

>The thing you have to worry about is the possibility of duplicate OIDs
>once your DB has been running long enough for the OID counter to wrap
>around (2^32 OIDs). You should make sure that index is specifically
>declared as UNIQUE, so that any attempt to insert a duplicate OID will
>fail. That might be enough for you, or you might want to add logic to
>your application to retry automatically after such a failure.
>
>
Ahh, yes ... this was what I thought may have be the problem, Not that
2^32 is a small number, but as time goes by on a busy system, this will
happened one day.

Unique index is a good plan, it will make an error but no data will be
harmed then !

How does PG itself handle a search on an duplicated oid, without a index
... return two rows ?

Will there be a future substitute for PGoidValue that is more reliable,
like a rowid ?

Thanks anyway !

/BL

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-01-14 19:01:57 Re: ntfs for windows port rc5-2
Previous Message Frank D. Engel, Jr. 2005-01-14 18:47:54 Re: [HACKERS] Much Ado About COUNT(*)