Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8bd4b89

Browse files
committed
Try to save a kernel call in ResolveRecoveryConflictWithVirtualXIDs.
If there's no work to be done, just exit quickly, before initialization.
1 parent 611fed3 commit 8bd4b89

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/storage/ipc/standby.c

+4
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ ResolveRecoveryConflictWithVirtualXIDs(VirtualTransactionId *waitlist,
193193
TimestampTz waitStart;
194194
char *new_status;
195195

196+
/* Fast exit, to avoid a kernel call if there's no work to be done. */
197+
if (!VirtualTransactionIdIsValid(*waitlist))
198+
return;
199+
196200
waitStart = GetCurrentTimestamp();
197201
new_status = NULL; /* we haven't changed the ps display */
198202

0 commit comments

Comments
 (0)