diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c index cc4f7b5302..e6427c54c5 100644 --- a/src/backend/access/transam/xlogrecovery.c +++ b/src/backend/access/transam/xlogrecovery.c @@ -1945,7 +1945,7 @@ ApplyWalRecord(XLogReaderState *xlogreader, XLogRecord *record, TimeLineID *repl * Indeed, logical walsenders on standby can't decode and send data until * it's been applied. * - * Physical walsenders don't need to be wakon up during replay unless + * Physical walsenders don't need to be woken up during replay unless * cascading replication is allowed and time line change occured (so that * they can notice that they are on a new time line). * @@ -1953,9 +1953,11 @@ ApplyWalRecord(XLogReaderState *xlogreader, XLogRecord *record, TimeLineID *repl * * - physical walsenders in case of new time line and cascade * replication is allowed. - * - always true for logical walsenders. + * - logical walsenders in case cascade replication is allowed (could not + * be created otherwise). */ - WalSndWakeup(switchedTLI && AllowCascadeReplication(), true); + if (AllowCascadeReplication()) + WalSndWakeup(switchedTLI, true); /* * If rm_redo called XLogRequestWalReceiverReply, then we wake up the