Thread: cache lookup failed for relation X

cache lookup failed for relation X

From
"Wei Wu"
Date:

I found some posts be developers discussing this issue last Jan. and Nov.. See link below.

http://search.postgresql.org/search?m=1&q=cache+lookup+failed+for+relation&l=&d=&s=

 

But have not been able to find any suggestion on how an end user can use to get around this problem.  Basically, we have a table X, trying to drop it would result an error message below:

 

cache lookup failed for relation XXXXX

 

I  am using PgAdmin  and I can still view the schema of this table, but any operation on it would get the above error.

 

Any suggestion on how to drop a table in this situation.

 

I am also wondering whether this problem has been fixed in newer PostgreSQL releases.

 

BTW, our postgreSQL version is 7.4.3.

 

Thanks.



This communication may contain information that is confidential, privileged or subject to copyright. If you are not the intended recipient, please advise by return e-mail and delete the message and any attachments immediately without reading, copying or forwarding to others.

Re: cache lookup failed for relation X

From
Tom Lane
Date:
"Wei Wu" <w.wu@delcan.com> writes:
> Basically, we have a table X, trying to drop
> it would result an error message below:
> cache lookup failed for relation XXXXX

You've got missing catalog rows, apparently.

> I  am using PgAdmin  and I can still view the schema of this table, but
> any operation on it would get the above error.

Hmmm ... how long since the system catalogs in this database were
vacuumed?

> I am also wondering whether this problem has been fixed in newer
> PostgreSQL releases.
> BTW, our postgreSQL version is 7.4.3.

It's hard to say, but you are three and a half years behind on bug fixes,
some of which certainly could have led to corruption of this sort.
You really should be running 7.4.19.  Read the release notes here:
http://www.postgresql.org/docs/7.4/static/release.html

            regards, tom lane