Re: BUG #18367: Cannot drop schema

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: charles(at)twenty(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18367: Cannot drop schema
Date: 2024-02-27 18:14:43
Message-ID: 2135024.1709057683@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2024-02-27 18:19:36 Re: BUG #18367: Cannot drop schema
Previous Message PG Bug reporting form 2024-02-27 18:00:17 BUG #18368: order by collation doesn't work as expected for the second column in the ORDER BY list