Be sure to release the lock on failure to launch logical replication worker.
authorFujii Masao <fujii@postgresql.org>
Tue, 24 Jan 2017 03:41:09 +0000 (12:41 +0900)
committerFujii Masao <fujii@postgresql.org>
Tue, 24 Jan 2017 03:41:09 +0000 (12:41 +0900)
Petr Jelinek

src/backend/replication/logical/launcher.c

index 18919724af4a0c018e88d1405c6b4fc074a0a496..b5116703578ca96f6d781c5465664bd3cfa9988d 100644 (file)
@@ -261,6 +261,7 @@ logicalrep_worker_launch(Oid dbid, Oid subid, const char *subname, Oid userid)
    /* Bail if not found */
    if (worker == NULL)
    {
+       LWLockRelease(LogicalRepWorkerLock);
        ereport(WARNING,
                (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED),
                 errmsg("out of logical replication workers slots"),