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[email protected]
/* 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);