diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index 4f209eab688..b659c320585 100644 --- a/src/backend/storage/ipc/standby.c +++ b/src/backend/storage/ipc/standby.c @@ -193,6 +193,10 @@ ResolveRecoveryConflictWithVirtualXIDs(VirtualTransactionId *waitlist, TimestampTz waitStart; char *new_status; + /* Fast exit, to avoid a kernel call if there's no work to be done. */ + if (!VirtualTransactionIdIsValid(*waitlist)) + return; + waitStart = GetCurrentTimestamp(); new_status = NULL; /* we haven't changed the ps display */