public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ashutosh Bapat <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: SATYANARAYANA NARLAPURAM <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: [Bug][patch]: After dropping the last label from a property graph element, invoking pg_get_propgraphdef() triggers an assertion failure
Date: Tue, 12 May 2026 07:05:06 +0530
Message-ID: <CAExHW5tMT71BwGzA7VCi3_6ZVYh-P2JCVrUW84DD-jw+7+3KuA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAHg+QDeP=mTHTV48R23zKMy1SBmCKZ_L7-z5zKnYyw+K0x-gCg@mail.gmail.com>
<CAExHW5tsOK7ja2dMykD_qQSLwsuZxCTHx_jFyx-7-O+9WRBDXQ@mail.gmail.com>
<CAHg+QDcXxmeiuySsyR5K=8Wk9Pq2sZ_4HNb6EMonN=yjLz_fyw@mail.gmail.com>
<CAExHW5t2YtTMnK7qbvL++pBet-5B8bzgU+8wMcC5aqZwBH0C9w@mail.gmail.com>
<CAHg+QDdAoW2cU2Wa-yKQs2awHxc19mkHGaAvDUZN=PZUDVsD=A@mail.gmail.com>
<CAExHW5uThebnwqyWHrsF2Z+no-fT8VrM0Yj+RU7YWrYzdavUZg@mail.gmail.com>
<CAExHW5tiOi=8Oq5Tza8gNz_jYmbWv+vb+p2fARUbfGnm-m7-9Q@mail.gmail.com>
<[email protected]>
On Mon, May 4, 2026 at 8:16 PM Peter Eisentraut <[email protected]> wrote:
>
> 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.
Done.
>
> 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.
>
AlterPropGraph already takes ShareRowExclusiveLock at the beginning so
only one label can be dropped at a time. I have added an isolation
test to test the scenario. We could further add some more tests to
make sure that properties can not be added to a label being dropped,
adding label to an element being dropped, adding label to an element
being added etc. Would that be an overkill?
--
Best Wishes,
Ashutosh Bapat
view thread (13+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: [Bug][patch]: After dropping the last label from a property graph element, invoking pg_get_propgraphdef() triggers an assertion failure
In-Reply-To: <CAExHW5tMT71BwGzA7VCi3_6ZVYh-P2JCVrUW84DD-jw+7+3KuA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox