Re: Help! pg_dump: Error message from server: ERROR: cache lookup failed for type 19

Поиск
Список
Период
Сортировка
От 夏武
Тема Re: Help! pg_dump: Error message from server: ERROR: cache lookup failed for type 19
Дата
Msg-id AANLkTimmYs+1N-QPFsbEZt8e8m=i1BLoS9WOLHM633cn@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Help! pg_dump: Error message from server: ERROR: cache lookup failed for type 19  (Craig Ringer <craig@postnewspapers.com.au>)
Ответы Re: Help! pg_dump: Error message from server: ERROR: cache lookup failed for type 19  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-general
I reconvery it  by \copy command.
thanks very much.

2010/9/13 Craig Ringer <craig@postnewspapers.com.au>
On 11/09/10 14:21, 夏武 wrote:
> i use the slony for replication of postgresql database. it work fine
> some day.
> After i use the slony command to delete the replication node, pg_dump
> does not work, the error message is:
> *pg_dump: schema with OID 73033 does not exist*
>
> Then i delete the name space of slony in  pg_namespace, and pg_dump does
> not work.
> So i delete the data of the name space in pg_class, pg_type, the command is:
> *DELETE FROM pg_class where relnamespace=73033*
> *DELETE FROM pg_type where relnamespace=73033*

That might not have been a very good idea. You're really not meant to go
messing with the catalog unless you *really* know what you are doing.

It sounds like you have a very badly messed up catalog. You will need to
find a way to dump your database so you can drop it, re-create it and
reload it.

> i got the error message:
> pg_dump: Error message from server: ERROR:  cache lookup failed for type 19

> How to fix it? How to recovery the database?

Your best chance is to do a pg_dump of each table, one by one, using the
"--table" option. Find out which table or tables are failing.

Once you know that, post here with the table definition, the exact
error, and the output of "select * from pg_class" and "select * from
pg_type". Somebody might be able to help you if there's enough information.

Alternately, you might be able to extract the data from the problem
table(s) using  the \copy command from psql. Then you can re-create them
in the new database and re-load their contents with \copy .

--
Craig Ringer

Tech-related writing: http://soapyfrogs.blogspot.com/

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Any plans to expose publicly (via stored proc) relation_needs_vacanalyze, or some flavour of do_autovacuum?
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Help! pg_dump: Error message from server: ERROR: cache lookup failed for type 19