Re: ERROR: cache lookup failed for relation NNNNN

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ridvan Lakas ng Bayan S(dot) Baluyos" <ridvan(at)baluyos(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: ERROR: cache lookup failed for relation NNNNN
Date: 2008-09-25 04:27:20
Message-ID: 24272.1222316840@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Ridvan Lakas ng Bayan S. Baluyos" <ridvan(at)baluyos(dot)net> writes:
> I'm having a problem dropping a schema. It displays the following errors:

> pos=# drop schema store_survey cascade;
> ERROR: cache lookup failed for relation 9026446

If you're on 8.2.not-the-latest or 8.3.not-the-latest, this is probably
a known bug. Update.

regards, tom lane

2008-07-11 12:08 tgl

* src/backend/catalog/: dependency.c (REL8_3_STABLE), dependency.c
(REL8_2_STABLE): Fix an oversight in the original implementation of
performMultipleDeletions(): the alreadyDeleted list has to be
passed down through deleteDependentObjects(), else objects that are
deleted via auto/internal dependencies don't get reported back up
to performMultipleDeletions(). Depending on the visitation order,
this could cause the code to try to delete an already-deleted
object, leading to strange errors in DROP OWNED (typically "cache
lookup failed for relation NNNNN" or similar). Per bug #4289.

Patch for back branches only. This code has recently been
rewritten in HEAD, and doesn't have this particular bug anymore.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Mike Ellsworth 2008-09-25 11:54:05 Packaged solution (Dump partial Schema?)
Previous Message Ridvan Lakas ng Bayan S. Baluyos 2008-09-25 04:10:59 ERROR: cache lookup failed for relation NNNNN