RE: 024_add_drop_pub.pl might fail due to deadlock - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: 024_add_drop_pub.pl might fail due to deadlock
Date
Msg-id OSCPR01MB14966BA12D93C1794FABC3E9EF525A@OSCPR01MB14966.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: 024_add_drop_pub.pl might fail due to deadlock  (Ajin Cherian <itsajin@gmail.com>)
Responses RE: 024_add_drop_pub.pl might fail due to deadlock
List pgsql-hackers
Dear Ajin,

> I have added "Ex functions" for back branches (PG_17 and earlier) ,
> which also have Asserts for making sure locks are taken. For PG_18 and
> HEAD, I've used the extra parameter already_locked.
> PG_14_15-v6-0001-Fix-a-deadlock-during-ALTER-SUBSCRIPTION.-DROP-PU.p
> atch
> is for both PG_14 and PG_15 and
> PG_18_HEAD-v6-0001-Fix-a-possible-deadlock-during-ALTER-SUBSCRIPTION
> is for both PG_18 and HEAD.
>

Thanks for creating the patch!
I feel the existing function here should be the wrapper of Ex function, so attached
patch did not match the expectation. table_open() and table_close() are called
both in UpdateSubscriptionRelState() and UpdateSubscriptionRelStateEx().
Another issue is that the variable "tag" is used by SET_LOCKTAG_OBJECT() even
without the debug build.

How do you feel the .diff file can be applied atop PG17 patch? It is mainly
same as v4 patch but has some assertion.

Best regards,
Hayato Kuroda
FUJITSU LIMITED


Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: encode/decode support for base64url
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: 024_add_drop_pub.pl might fail due to deadlock