Don't wake up logical replication launcher unnecessarily
authorPeter Eisentraut
Tue, 2 May 2017 02:50:32 +0000 (22:50 -0400)
committerPeter Eisentraut
Tue, 2 May 2017 02:50:32 +0000 (22:50 -0400)
In CREATE SUBSCRIPTION, only wake up the launcher when the subscription
is enabled.

Author: Fujii Masao 

src/backend/commands/subscriptioncmds.c

index c597a244f887100feb5ae207440a2f43c6040a43..ee0983fd87e09e9847c12bf500a8c3305e9bd2ff 100644 (file)
@@ -452,7 +452,8 @@ CreateSubscription(CreateSubscriptionStmt *stmt, bool isTopLevel)
 
    heap_close(rel, RowExclusiveLock);
 
-   ApplyLauncherWakeupAtCommit();
+   if (enabled)
+       ApplyLauncherWakeupAtCommit();
 
    ObjectAddressSet(myself, SubscriptionRelationId, subid);