Re: pg_class.relnamespace NOT IN pg_namespace.oid

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_class.relnamespace NOT IN pg_namespace.oid
Дата
Msg-id 18937.1330376349@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_class.relnamespace NOT IN pg_namespace.oid  (Ireneusz Pluta <ipluta@wp.pl>)
Ответы Re: pg_class.relnamespace NOT IN pg_namespace.oid  (Ireneusz Pluta <ipluta@wp.pl>)
Список pgsql-general
Ireneusz Pluta <ipluta@wp.pl> writes:
> It apperas that I have some entries in pg_class that have relnamespace not appearing in
> pg_namespace. So pg_dump fails with "pg_dump: schema with OID 52072764 does not exist", I guess.

That's a bit disturbing --- do you have any idea what triggered that?

> How to get rid of or fix these damaged entries? Just try to delete from pg_class manually (and then
> delete files pointed to by their relfilenode)? Or create a new schema and update
> pg_class.relnamespace to the oid of the new schema and then inspect and drop?

I'd do the latter I think.  Keep in mind that there are probably also
entries in pg_depend linking the tables to the schemas.  If your goal is
only to get to a clean dumpable state and then dump and reload the
database, you probably don't need to worry about fixing pg_depend.
However, if you intend to keep on using the database without a reload,
it'd be prudent to make sure pg_depend is straightened out as well.

            regards, tom lane

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Having a problem with RoR-3.1.1 and Pg-9.1
Следующее
От: "James B. Byrne"
Дата:
Сообщение: Re: Having a problem with RoR-3.1.1 and Pg-9.1