DDL commands don't handle OID wrap - Mailing list pgsql-admin

From Jim C. Nasby
Subject DDL commands don't handle OID wrap
Date
Msg-id 20060417193829.GN49405@pervasive.com
Whole thread Raw
Responses Re: DDL commands don't handle OID wrap  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Haven't seen this in previous discussions of OID wrap in the archives.
The issue is that DDL statements don't make any attempt to skip past
used ranges of OIDs.

duplicate key violates unique constraint "pg_attrdef_oid_index"
duplicate key violates unique constraint "pg_type_oid_index"
etc...

While part of the solution is obviously not to define tables WITH OIDS,
I would argue that this is still an issue because temporary objects use
OIDs. I'm wondering if anyone has run into this problem and isn't using
tables with OIDs.

Probably the easiest way to fix this would be to trap oid unique
constraint violations on catalog tables and find the next available
number to use (probably want to bump the OID counter up to that at the
same time).

Of course a better method would be to drop OIDs from the catalog tables
completely, but given the amount of work involved in that...
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

pgsql-admin by date:

Previous
From: "Guido Barosio"
Date:
Subject: Re: downward dump compatibility
Next
From: Tom Lane
Date:
Subject: Re: DDL commands don't handle OID wrap