pg_class.reltype -> pg_type.oid missing for pg_toast table

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема pg_class.reltype -> pg_type.oid missing for pg_toast table
Дата
Msg-id badc16fc-b6bd-411f-b9c0-92f8ac1d0ae5@www.fastmail.com
обсуждение исходный текст
Ответы Re: pg_class.reltype -> pg_type.oid missing for pg_toast table  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I have a memory of the catalog not being MVCC,
so maybe this is normal and expected,
but I wanted to report it in case it's not.

When copying all tables in pg_catalog, to a separate schema with the purpose
of testing if foreign keys could be added for all oid columns, I got an error for a toast table:

ERROR:  insert or update on table "pg_class" violates foreign key constraint "pg_class_reltype_fkey"
DETAIL:  Key (reltype)=(86987582) is not present in table "pg_type".
CONTEXT:  SQL statement "
    ALTER TABLE catalog_fks.pg_class ADD FOREIGN KEY (reltype) REFERENCES catalog_fks.pg_type (oid)
  "

The copies of pg_catalog were executed in one and the same transaction,
but as separate queries in a PL/pgSQL function using EXECUTE.

/Joel

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Stronger safeguard for archive recovery not to miss data
Следующее
От: David Fetter
Дата:
Сообщение: Re: popcount