8.3.5: Types with typnamespace pointing at non-existent pg_namespace oid

Поиск
Список
Период
Сортировка
От Daniel Farina
Тема 8.3.5: Types with typnamespace pointing at non-existent pg_namespace oid
Дата
Msg-id AANLkTintLoKYsowSW5XiUW_eaX-xCGe+SvyrdzDR1HE3@mail.gmail.com
обсуждение исходный текст
Ответы Re: 8.3.5: Types with typnamespace pointing at non-existent pg_namespace oid
Список pgsql-bugs
A medium-length story short, this query returns non-zero:

select count(distinct typnamespace) from pg_type where  not exists
(select 1 from pg_namespace where oid = pg_type.typnamespace);

I did a very brief search in all the release notes for 8.3.5 to
8.3.14, but have not found precisely what I was looking for (searches
for namespace, schema, type, and corruption).

This was discovered when performing a pg_dump of this user's database,
whereby pg_dump complained when trying to dump types for lack of a
good catalog entry to nab the namespace name from. In our case, two
namespaces seem to be affected. The user of this database was never
privileged enough to even perform CREATE SCHEMA, to my knowledge, and
in fact only have the schema (owned by the postgres superuser) that
they began with.

Is it safe to perform an UPDATE on pg_type to give entries a valid
typnamespace? Is there any forensic evidence I can grab before doing
that to assist in figuring out the mechanism for this bug, if
applicable?

Cheers.

--
fdr

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

Предыдущее
От: Maxim Boguk
Дата:
Сообщение: Re: BUG #5798: Some weird error with pl/pgsql procedure
Следующее
От: Daniel Farina
Дата:
Сообщение: Re: 8.3.5: Types with typnamespace pointing at non-existent pg_namespace oid