DDL commands don't handle OID wrap

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема DDL commands don't handle OID wrap
Дата
Msg-id 20060417193829.GN49405@pervasive.com
обсуждение исходный текст
Ответы Re: DDL commands don't handle OID wrap
Список 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 по дате отправления:

Предыдущее
От: "Guido Barosio"
Дата:
Сообщение: Re: downward dump compatibility
Следующее
От: Tom Lane
Дата:
Сообщение: Re: DDL commands don't handle OID wrap