Monthly Summary: Fix DROP PROPERTY GRAPH "unsupported object class" error — May 2026
Problem Statement
PostgreSQL's SQL/PGQ Property Graph feature (authored by Peter Eisentraut) introduces catalogs pg_propgraph_element_label and pg_propgraph_label_property that participate in pg_depend but were never registered in the object-address machinery (objectaddress.c). Under normal DROP PROPERTY GRAPH this is latent, but when an event trigger is active, pg_event_trigger_dropped_objects() calls getObjectTypeDescription()/getObjectIdentityParts() for every dropped sub-object, hitting the default switch arm and aborting with ERROR: unsupported object class %u.
Key Developments
Early Iterations (v1–v6): Fix and Expand
Bertrand Drouvot authored the patch, which adds switch arms for both catalogs in getObjectTypeDescription(), getObjectIdentityParts(), and the ObjectProperty[] table. During review, Ashutosh Bapat drove several significant refinements:
- Identity string correctness: The initial patch's identity was lossy — it omitted the label name for label-properties, breaking
pg_get_object_address()round-tripping. Fixed to include element and label names. - Naming convention: Ashutosh argued for
"property graph element label property"(mirroring element→label→property hierarchy) rather than tracking the catalog name. This initially won by deference to Peter. get_catalog_object_by_oid()adoption: Preferred modern idiom over open-coded syscache/seqscan lookups.- Test strategy: Recursive CTE over
pg_dependfor coverage; tests moved toevent_trigger.sql(isolated group) per Michael Paquier's parallel-safety objection.
An incidental discovery — property graphs were spuriously generating composite/array types — spawned a separate fix (commit 891a57c7394).
Michael Paquier's Intervention: Partial Commit + Pushback
Michael committed the getObjectDescription() refactoring (converting to get_catalog_object_by_oid()) as an independent commit, decoupling it from the remaining fix. He then reopened two points:
- Naming: Pushed back on "element label property", preferring catalog-aligned
"property graph label property". - Identity ambiguity: Flagged that when element and label share a name (e.g., both
e), the identity string produces confusing"k1 of e of e of ..."— correct but unreadable without role keywords.
He posted v7 reflecting catalog-aligned naming, pending Peter's input.
Peter Eisentraut's Response: A Third Option
Peter revealed the omission was semi-intentional and proposed a fundamentally different approach:
- These catalogs are implementation details of property graph storage decomposition.
- Exposing them via
objectaddress.cimplicitly promises API stability for the catalog layout, constraining future refactoring. - The fix could be to filter these classes out of the object-address path rather than teach it to describe them.
On naming, Peter sided with Michael ("property graph label property"), effectively rejecting Ashutosh's hierarchy-based proposal.
Michael pushed back on the skip proposal, arguing objectaddress.c exists precisely to make catalog dependencies legible, and suppressing sub-objects defeats that purpose.
Current State (End of May)
The thread is blocked on a three-way design decision pending Peter's final call:
| Option | Proponent | Trade-off |
|---|---|---|
| Describe with full hierarchy | Ashutosh | Rich identity, exposes layout as contract |
| Describe tracking catalog name | Michael, Peter (if describing) | Simpler text, still exposes layout |
| Skip these catalogs entirely | Peter | Preserves refactoring freedom, loses event-trigger visibility |
The uncontroversial getObjectDescription() refactor has been committed. The core bug fix (v7) awaits resolution of skip-vs-describe.
Architectural Significance
The thread surfaced a broader design principle: wiring decomposed sub-catalogs into objectaddress.c commits the project to that decomposition as a user-visible contract. This generalizes beyond property graphs to any feature using multiple implementation catalogs linked via pg_depend.