Re: OID Usage - Mailing list pgsql-general

From Bo Lorentsen
Subject Re: OID Usage
Date
Msg-id 41E81651.1020900@netgroup.dk
Whole thread Raw
In response to Re: OID Usage  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-general by date:

Previous
From: "Frank D. Engel, Jr."
Date:
Subject: Re: [HACKERS] Much Ado About COUNT(*)
Next
From: Martijn van Oosterhout
Date:
Subject: Re: ntfs for windows port rc5-2