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

From: 夏武 <xia(dot)wu(dot)cn(at)gmail(dot)com>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Help! pg_dump: Error message from server: ERROR: cache lookup failed for type 19
Date: 2010-09-14 03:02:22
Message-ID: AANLkTimmYs+1N-QPFsbEZt8e8m=i1BLoS9WOLHM633cn@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I reconvery it by \copy command.
thanks very much.

2010/9/13 Craig Ringer <craig(at)postnewspapers(dot)com(dot)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/
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2010-09-14 03:24:22 Re: Help! pg_dump: Error message from server: ERROR: cache lookup failed for type 19
Previous Message Tom Lane 2010-09-14 02:01:51 Re: Any plans to expose publicly (via stored proc) relation_needs_vacanalyze, or some flavour of do_autovacuum?