Re: 024_add_drop_pub.pl might fail due to deadlock
Ajin Cherian <itsajin@gmail.com>
From: Ajin Cherian <itsajin@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-07-16T03:08:04Z
Lists: pgsql-hackers
Attachments
- HEAD-v2-0001-Fix-a-possible-deadlock-during-ALTER-SUBSCRIPTION.patch (application/octet-stream) patch v2-0001
On Tue, Jul 15, 2025 at 2:24 PM vignesh C <vignesh21@gmail.com> wrote: > > Couple of comments: > 1) This change is not required: > #include "utils/snapmgr.h" > #include "utils/syscache.h" > #include "utils/usercontext.h" > +#include "utils/injection_point.h" > > 2) This can not only happen in error case but also in normal cases > where the tablesync worker is slower as shown in the script to > reproduce, we can update the commit message accordingly: > In most situations the tablesync worker will drop the corresponding > origin before it > finishes executing, but if an error causes the tablesync worker to > fail just prior to > dropping the origin, the apply worker will later find the origin and drop it. Thanks for the test and confirming the fix. Fixed the comments. 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