Tom Lane wrote:
The thing you have to worry about is the possibility of duplicate OIDsAhh, 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.
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.
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
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
http://archives.postgresql.org