Dangling operator family after DROP TYPE
Yoran Heling <contact@yorhel.nl>
From: Yoran Heling <contact@yorhel.nl>
To: pgsql-bugs@lists.postgresql.org
Date: 2024-12-06T15:15:20Z
Lists: pgsql-bugs
Attachments
- t.sql (application/sql)
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.
Commits
-
Ensure that pg_amop/amproc entries depend on their lefttype/righttype.
- ec7b89cc533a 17.3 landed
- be5db08ed341 16.7 landed
- 725d9810287f 13.19 landed
- 3f9b96217667 18.0 landed
- 1a34cf0f485b 14.16 landed
- 0e4fa06ba55e 15.11 landed
-
Make getObjectDescription robust against dangling amproc type links.
- faad0183507b 16.7 landed
- d9d5e1b48e0d 14.16 landed
- d401914679de 15.11 landed
- c82003760d74 18.0 landed
- 5b44a317ae03 17.3 landed
- 531cbd8b74a5 13.19 landed