Re: Cache lookup failed for relation, when trying to DROP

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cache lookup failed for relation, when trying to DROP
Дата
Msg-id 26917.1097078416@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Cache lookup failed for relation, when trying to DROP TABLE.  (Mark Gibson <gibsonm@cromwell.co.uk>)
Ответы Re: Cache lookup failed for relation, when trying to DROP  (Mark Gibson <gibsonm@cromwell.co.uk>)
Список pgsql-general
Mark Gibson <gibsonm@cromwell.co.uk> writes:
> Right then, I think I've got this sorted,
> DROP TABLE worked after a swift:
> DELETE FROM pg_depend WHERE objid = 5173132;

There's something awfully flaky going on here.  The system should never
have let you get into this state in the first place: the entire point of
pg_depend is that you can't delete the referenced object without
deleting the referencing object.  Had you been doing anything odd before
this (like perhaps manually deleting catalog rows)?  You mentioned
having dropped the troublesome rule; did you do that by-the-book with
DROP RULE, or did you just DELETE FROM pg_rewrite?

> Do you think I should be safe to continue working with the database now,
> without a full dump and restore?

Hard to say.  If you haven't been sticking your fingers where they
shouldn't go, then this definitely represents a failure of the
dependency mechanism.  Aside from the possibility of plain old bugs,
I'd be wondering about corrupted indexes on pg_depend.

            regards, tom lane

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

Предыдущее
От: Dennis Gearon
Дата:
Сообщение: Re: database constraints
Следующее
От: frederic.germaneau@bull.net
Дата:
Сообщение: Help on copy function