diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 61754312e2..faf8d9c4f0 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -4456,15 +4456,16 @@ ReadRecord(XLogReaderState *xlogreader, int emode, */ lastSourceFailed = false; currentSource = XLOG_FROM_ANY; - - continue; } - /* In standby mode, loop back to retry. Otherwise, give up. */ - if (StandbyMode && !CheckForStandbyTrigger()) - continue; - else + else if (!StandbyMode || CheckForStandbyTrigger()) return NULL; + + /* + * This possibly-long loop needs to handle interrupts of startup + * process. + */ + HandleStartupProcInterrupts(); } } }