Re: BUG #18367: Cannot drop schema - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18367: Cannot drop schema
Date
Msg-id 2135024.1709057683@sss.pgh.pa.us
Whole thread Raw
In response to BUG #18367: Cannot drop schema  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #18367: Cannot drop schema  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> When trying to drop a schema using DROP SCHEMA "brokenSchema"; 

> I'm facing the following error:
> requested object address for unsupported object class 2: text result ""

> The schema is empty from any table, type, trigger...

That shouldn't happen :-(.  I am guessing the cause is a corrupt
entry in pg_depend.  Class 2 is OCLASS_TYPE, so apparently some
type got dropped but its pg_depend entry wasn't cleaned out, so
DROP SCHEMA thinks there's still a dependent object.

I would try to pg_dump the database, and if you can do that and
reload successfully then discard the original.  If you've found
one bit of catalog corruption there's likely more.

            regards, tom lane



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18368: order by collation doesn't work as expected for the second column in the ORDER BY list
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #18367: Cannot drop schema