aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2010-12-17 11:32:02 -0500
committerRobert Haas <rhaas@postgresql.org>2010-12-17 11:32:02 -0500
commit8bd4b89e240cc6488f5e1523202cc2d27e9970c0 (patch)
tree86209987a57fdc1378ebccd0bec7d08fb9fdb8e1 /src
parent611fed371227f430e71d0ff7fed037f1006b410d (diff)
downloadpostgresql-8bd4b89e240cc6488f5e1523202cc2d27e9970c0.tar.gz
postgresql-8bd4b89e240cc6488f5e1523202cc2d27e9970c0.zip
Try to save a kernel call in ResolveRecoveryConflictWithVirtualXIDs.
If there's no work to be done, just exit quickly, before initialization.
Diffstat (limited to 'src')
-rw-r--r--src/backend/storage/ipc/standby.c4
1 files changed, 4 insertions, 0 deletions
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 */