Re: DROP SCHEMA xxx CASCADE: ERROR: could not open relation with OID yyy - Mailing list pgsql-hackers

From strk
Subject Re: DROP SCHEMA xxx CASCADE: ERROR: could not open relation with OID yyy
Date
Msg-id 20110216120412.GI95727@keybit.net
Whole thread Raw
In response to Re: DROP SCHEMA xxx CASCADE: ERROR: could not open relation with OID yyy  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Feb 10, 2011 at 12:03:49AM -0500, Tom Lane wrote:
> strk <strk@keybit.net> writes:
> > I've finally completed the debugging phase and have
> > a minimal self-contained testcase showing the problem.
> > It has to do with INITIALLY DEFERRED constraints.
> 
> I looked into this and find that the issue is you're trying to drop a
> table that has unfired AFTER TRIGGER events pending.  When they finally
> fire, they can't find the table anymore.
> 
> I'm inclined to think that we should disallow that; or even more to the
> point, that it'd be a good thing to apply CheckTableNotInUse() when
> about to drop a table.  If we disallow such cases for ALTER TABLE, then
> a fortiori we should do so for DROP TABLE.

Makes sense to me disallowing drop.
An intuitive error message is all I was looking for.

--strk; 
 ()   Free GIS & Flash consultant/developer /\   http://strk.keybit.net/services.html


pgsql-hackers by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Fwd: [JDBC] Weird issues when reading UDT from stored function
Next
From: Robert Haas
Date:
Subject: Re: Change pg_last_xlog_receive_location not to move backwards