projects
/
users
/
hanada
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
611fed3
)
Try to save a kernel call in ResolveRecoveryConflictWithVirtualXIDs.
author
Robert Haas
<
[email protected]
>
Fri, 17 Dec 2010 16:32:02 +0000
(11:32 -0500)
committer
Robert Haas
<
[email protected]
>
Fri, 17 Dec 2010 16:32:02 +0000
(11:32 -0500)
If there's no work to be done, just exit quickly, before initialization.
src/backend/storage/ipc/standby.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/storage/ipc/standby.c
b/src/backend/storage/ipc/standby.c
index 4f209eab68896f2006e8a8459ad11ba6cfc7ebf5..b659c320585c9aef6302c0723dc29ff1c16354db 100644
(file)
--- 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 */