Re: 024_add_drop_pub.pl might fail due to deadlock
Ajin Cherian <itsajin@gmail.com>
From: Ajin Cherian <itsajin@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>,
vignesh C <vignesh21@gmail.com>, Alexander Lakhin <exclusion@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-07-29T09:16:34Z
Lists: pgsql-hackers
Attachments
- PG_14_15-v6-0001-Fix-a-deadlock-during-ALTER-SUBSCRIPTION.-DROP-PU.patch (application/octet-stream) patch v6-0001
- PG_16-v6-0001-Fix-a-deadlock-during-ALTER-SUBSCRIPTION.-DROP-PU.patch (application/octet-stream) patch v6-0001
- PG_18_HEAD-v6-0001-Fix-a-possible-deadlock-during-ALTER-SUBSCRIPTION.patch (application/octet-stream) patch v6-0001
- PG_17-v6-0001-Fix-a-deadlock-during-ALTER-SUBSCRIPTION.-DROP-PU.patch (application/octet-stream) patch v6-0001
On Tue, Jul 29, 2025 at 1:13 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > Yes, that makes sense to me. For HEAD and PG18, we can still add a new > argument to the API. For other bank branches, it is better to use a > new Ex function as suggested by Kuroda-San. > Here are the updated patches. 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.patch 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. regards, Ajin Cherian Fujitsu Australia
Commits
-
Fix a deadlock during ALTER SUBSCRIPTION ... DROP PUBLICATION.
- 2ab2d6f97058 19 (unreleased) landed
- d9f01a287ab1 18.0 landed
- 434d2d147b58 15.14 landed
- 41fb3f51cb74 14.19 landed
- 8c298324a4f3 17.6 landed
- adfd8021911a 16.10 landed