Commit 39b8cc99 authored by Fujii Masao's avatar Fujii Masao

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
parent 14e9b18f
...@@ -514,6 +514,8 @@ DropSubscription(DropSubscriptionStmt *stmt) ...@@ -514,6 +514,8 @@ DropSubscription(DropSubscriptionStmt *stmt)
/* Kill the apply worker so that the slot becomes accessible. */ /* Kill the apply worker so that the slot becomes accessible. */
logicalrep_worker_stop(subid); logicalrep_worker_stop(subid);
LWLockRelease(LogicalRepLauncherLock);
/* Remove the origin tracking if exists. */ /* Remove the origin tracking if exists. */
snprintf(originname, sizeof(originname), "pg_%u", subid); snprintf(originname, sizeof(originname), "pg_%u", subid);
originid = replorigin_by_name(originname, true); originid = replorigin_by_name(originname, true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment