From: Robert Haas Date: Fri, 17 Dec 2010 16:32:02 +0000 (-0500) Subject: Try to save a kernel call in ResolveRecoveryConflictWithVirtualXIDs. X-Git-Tag: REL9_1_ALPHA3~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8bd4b89e240cc6488f5e1523202cc2d27e9970c0;p=postgresql Try to save a kernel call in ResolveRecoveryConflictWithVirtualXIDs. If there's no work to be done, just exit quickly, before initialization. --- diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index 4f209eab68..b659c32058 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 */