pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yoran Heling <contact@yorhel.nl>
To: pgsql-bugs@lists.postgresql.org
Subject: Dangling operator family after DROP TYPE
Date: Fri, 6 Dec 2024 16:15:20 +0100
Message-ID: <Z1MVCOh1hprjK5Sf@gmai021> (raw)

Hello list,

pg_upgrade was failing on one of my databases and, while digging a bit,
I found that the database in question contained a dangling operator
family for a type that didn't exist anymore.

I've attached a script to recreate this situation: creating a new type,
defining an operator class for it and then dropping the type causes the
implicitly created operator family to remain.

Attempting to drop this operator family results in an error. Attempting
to do a dump/restore results in a syntax error on restore.

The problematic database I found this on was running 15.10, but with the
attached script I can also reproduce it on 17.2.

Happy to provide more information as needed,

Yoran.

Attachments:

  [application/sql] t.sql (2.8K, ../Z1MVCOh1hprjK5Sf@gmai021/2-t.sql)
  download

view thread (4+ messages)  latest in thread

Message-ID: <Z1MVCOh1hprjK5Sf@gmai021>
Permalink:  ../Z1MVCOh1hprjK5Sf@gmai021/
Also on:    postgresql.org/message-id/Z1MVCOh1hprjK5Sf@gmai021

 · 

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: contact@yorhel.nl, pgsql-bugs@lists.postgresql.org
  Subject: Re: Dangling operator family after DROP TYPE
  In-Reply-To: <Z1MVCOh1hprjK5Sf@gmai021>

* 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