Re: [Bug][patch]: After dropping the last label from a property graph element, invoking pg_get_propgraphdef() triggers an assertion failure

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [Bug][patch]: After dropping the last label from a property graph element, invoking pg_get_propgraphdef() triggers an assertion failure
Date: 2026-05-04 14:46:21
Message-ID: 3762a2e0-d3be-40e7-83d2-52dc3e1a21b2@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 28.04.26 17:02, Ashutosh Bapat wrote:
> We are looking up element label catalogs twice in this patch - first
> to find the label to be dropped and then to find the number of labels
> associated with the given element. I combined these two into a single
> while loop.

That looks okay, but I think the names of the local variables are now a
bit off. I would expect elrel and elscan to refer to
pg_propgraph_element, not pg_propgraph_element_label. Maybe use
ellabelrel etc.

Also, I think this code needs to think a bit about locking to handle the
situation where more than one DROP LABEL operation happens concurrently.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-05-04 14:47:51 Re: [Bug][patch]: After dropping the last label from a property graph element, invoking pg_get_propgraphdef() triggers an assertion failure
Previous Message Ayush Tiwari 2026-05-04 14:43:41 Re: [PATCH] Reject ENCODING option for COPY TO FORMAT JSON