From a99448ab4515aaadc17647e53633f418893f5adf Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 1 May 2017 22:50:32 -0400 Subject: [PATCH] Don't wake up logical replication launcher unnecessarily In CREATE SUBSCRIPTION, only wake up the launcher when the subscription is enabled. Author: Fujii Masao --- src/backend/commands/subscriptioncmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index c597a244f8..ee0983fd87 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -452,7 +452,8 @@ CreateSubscription(CreateSubscriptionStmt *stmt, bool isTopLevel) heap_close(rel, RowExclusiveLock); - ApplyLauncherWakeupAtCommit(); + if (enabled) + ApplyLauncherWakeupAtCommit(); ObjectAddressSet(myself, SubscriptionRelationId, subid);