1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-02 11:44:50 +03:00

Try to save a kernel call in ResolveRecoveryConflictWithVirtualXIDs.

If there's no work to be done, just exit quickly, before initialization.
This commit is contained in:
Robert Haas 2010-12-17 11:32:02 -05:00
parent 611fed3712
commit 8bd4b89e24

View File

@ -193,6 +193,10 @@ ResolveRecoveryConflictWithVirtualXIDs(VirtualTransactionId *waitlist,
TimestampTz waitStart; TimestampTz waitStart;
char *new_status; char *new_status;
/* Fast exit, to avoid a kernel call if there's no work to be done. */
if (!VirtualTransactionIdIsValid(*waitlist))
return;
waitStart = GetCurrentTimestamp(); waitStart = GetCurrentTimestamp();
new_status = NULL; /* we haven't changed the ps display */ new_status = NULL; /* we haven't changed the ps display */