Prevent dropping the last label from a property graph element
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-07-03T10:00:25Z
Releases:
19 (unreleased)
Prevent dropping the last label from a property graph element Per SQL/PGQ standard, every graph element must have at least one label. When dropping a label from a graph element, ensure that there exists at least one other label on the element. If the label being dropped is the only label on the element, raise an error. We hold a ShareRowExclusiveLock when modifying a property graph. Hence the label will not be dropped even when multiple labels are being dropped concurrently. Author: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Author: Satyanarayana Narlapuram <satyanarlapuram@gmail.com> Reported-by: Satyanarayana Narlapuram <satyanarlapuram@gmail.com> Discussion: https://www.postgresql.org/message-id/CAHg+QDeP=mTHTV48R23zKMy1SBmCKZ_L7-z5zKnYyw+K0x-gCg@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/alter_property_graph.sgml | modified | +3 −1 |
| src/backend/commands/propgraphcmds.c | modified | +50 −5 |
| src/test/regress/expected/create_property_graph.out | modified | +7 −0 |
| src/test/regress/sql/create_property_graph.sql | modified | +5 −0 |
Discussion
- [Bug][patch]: After dropping the last label from a property graph element, invoking pg_get_propgraphdef() triggers an assertion failure 16 messages · 2026-04-20 → 2026-07-06