pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18367: Cannot drop schema
3+ messages / 3 participants
[nested] [flat]
* BUG #18367: Cannot drop schema
@ 2024-02-27 16:11 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: PG Bug reporting form @ 2024-02-27 16:11 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: charles@twenty.com
The following bug has been logged on the website:
Bug reference: 18367
Logged by: Charles Bochet
Email address: charles@twenty.com
PostgreSQL version: 15.5
Operating system: PostgreSQL 15.5 on x86_64-pc-linux-gnu, compiled b
Description:
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...
I haven't found any reference to this error on the internet.
Thanks a lot,
Charles
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #18367: Cannot drop schema
@ 2024-02-27 18:14 Tom Lane <tgl@sss.pgh.pa.us>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: Tom Lane @ 2024-02-27 18:14 UTC (permalink / raw)
To: charles@twenty.com; +Cc: pgsql-bugs@lists.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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #18367: Cannot drop schema
@ 2024-02-27 18:19 Alvaro Herrera <alvherre@alvh.no-ip.org>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Alvaro Herrera @ 2024-02-27 18:19 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: charles@twenty.com; pgsql-bugs@lists.postgresql.org
On 2024-Feb-27, Tom Lane wrote:
> 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.
I second that recommendation. However, there's also pg_catcheck which
could help diagnose and fix things, in case a dump/restore of the whole
database is impractical. If you operate it wrong enough, you can
corrupt your whole database though.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
Voy a acabar con todos los humanos / con los humanos yo acabaré
voy a acabar con todos (bis) / con todos los humanos acabaré ¡acabaré! (Bender)
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-02-27 18:19 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27 16:11 BUG #18367: Cannot drop schema PG Bug reporting form <noreply@postgresql.org>
2024-02-27 18:14 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-02-27 18:19 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
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