RE: 024_add_drop_pub.pl might fail due to deadlock
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Ajin Cherian' <itsajin@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>, Alexander Lakhin <exclusion@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, Amit Kapila <amit.kapila16@gmail.com>
Date: 2025-07-29T01:53:00Z
Lists: pgsql-hackers
Dear Ajin, > Thanks for your review Kuroda-san, I have changed the logic to not use > already_locked and instead check if the locks are taken inside > UpdateSubscriptionRelState itself. I've tested this and this works > fine. If this logic is acceptable to the reviewers I can update the > other patches also in a similar way. Thanks for updates. However, I found that functions like LockHeldByMe(), CheckRelationOidLockedByMe() and LWLockHeldByMe() have been used only for the debug build. Functions like ProcArraySetReplicationSlotXmin() and MarkAsPrepared() can remove the flag from the argument but they are retained till now. Based on that, I suggest adding new argument (or add new Ex function for bank branches) and do the assertion check when the assertion is enabled in this build. Thought? Best regards, Hayato Kuroda FUJITSU LIMITED
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