pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: charles@twenty.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18367: Cannot drop schema
Date: Tue, 27 Feb 2024 13:14:43 -0500
Message-ID: <2135024.1709057683@sss.pgh.pa.us> (raw)
In-Reply-To: <18367-8d35c5ecb617d821@postgresql.org>
References: <18367-8d35c5ecb617d821@postgresql.org>

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





view thread (3+ messages)  latest in thread

Message-ID: <2135024.1709057683@sss.pgh.pa.us>
Permalink:  ../2135024.1709057683@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2135024.1709057683@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, charles@twenty.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18367: Cannot drop schema
  In-Reply-To: <2135024.1709057683@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox