summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFujii Masao2017-02-03 18:18:13 +0000
committerFujii Masao2017-02-03 18:18:13 +0000
commit39b8cc991fe31ee8df8b0fee467bbd9800fcc1c5 (patch)
treee9e9295fedf0e50008279a01daa3e4f16bd895a8
parent14e9b18fed289e483ed28daec60fdab95da9cc48 (diff)
Be sure to release LogicalRepLauncherLock in DROP SUBSCRIPTION command.
Previously DROP SUBSCRIPTION command forgot to release the lock at all. Original patches by Kyotaro Horiguchi and Michael Paquier, but I didn't use them. Discussion: http://postgr.es/m/20170201.173623.66249355.horiguchi.kyotaro@lab.ntt.co.jp
-rw-r--r--src/backend/commands/subscriptioncmds.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 3b708075653..4353e14e1bd 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -514,6 +514,8 @@ DropSubscription(DropSubscriptionStmt *stmt)
/* Kill the apply worker so that the slot becomes accessible. */
logicalrep_worker_stop(subid);
+ LWLockRelease(LogicalRepLauncherLock);
+
/* Remove the origin tracking if exists. */
snprintf(originname, sizeof(originname), "pg_%u", subid);
originid = replorigin_by_name(originname, true);