Re: BUG #4289: drop owned by report ERROR: cache lookup failed for relation 16390

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: crystal <crystal_lium(at)163(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4289: drop owned by report ERROR: cache lookup failed for relation 16390
Date: 2008-07-09 15:18:24
Message-ID: 13285.1215616704@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Rats. I guess this is due to the two-pass nature of some algorithm.
> (Dropping owned by u1 cascade drops the view too, and then when dropping
> owned by u2, it tries to find the view and the cache lookup fails).

Actually, on looking closer, the problem is that recursiveDeletion fails
to pass alreadyDeleted down to (and through) deleteDependentObjects.
So the cascaded delete doesn't get reported back to
performMultipleDeletions, and it doesn't know to skip the view when it
gets to it. So this is clearly a bug, and seemingly not so hard to fix.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2008-07-09 15:26:18 Re: BUG #4289: drop owned by report ERROR: cache lookup failed for relation 16390
Previous Message Alvaro Herrera 2008-07-09 15:08:42 Re: BUG #4289: drop owned by report ERROR: cache lookup failed for relation 16390