Cannot shutdown subscriber after DROP SUBSCRIPTION
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
From: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
To: pgsql-hackers@postgresql.org
Date: 2017-02-01T08:36:23Z
Lists: pgsql-hackers
Attachments
- fix_block_by_drop_subscription_v1.patch (text/x-patch) patch v1
Hello, while looking another bug, I found that standby cannot shutdown after DROP SUBSCRIPTION. standby=# CREATE SUBSCRPTION sub1 ... standby=# .... standby=# DROP SUBSCRIPTION sub1; Ctrl-C to the standby fails to work. ApplyLauncherMain is waiting LogicalRepLauncherLock forever. The culprit is DropSbuscription. It acquires LogicalRepLauncherLock but never releases. The attached patch fixes it. Most part of the fucntion is now enclosed by PG_TRY-CATCH since some functions can throw exceptions. regards, -- Kyotaro Horiguchi NTT Open Source Software Center
Commits
-
Prevent logical rep workers with removed subscriptions from starting.
- 4eafdcc27608 10.0 landed