Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 397cd0b

Browse filesBrowse files
author
Amit Kapila
committed
Remove redundant fetch of the recent flush pointer in WalSndWaitForWal.
In WalSndWaitForWal(), we fetch a recent flush pointer both outside the loop and inside the loop. But we start using RecentFlushPtr only after we fetch it inside the loop. So we can remove one outside the loop. Author: Shveta Malik Reviewed-by: Bertrand Drouvot, Matthias van de Meent, Amit Kapila Discussion: https://postgr.es/m/CAJpy0uBSCQz1yMD-WiEthzEe23dti2-Kr_pitVb7vAPFbFKm=A@mail.gmail.com
1 parent 2c8118e commit 397cd0b
Copy full SHA for 397cd0b

File tree

Expand file treeCollapse file tree

1 file changed

+0
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-6
lines changed

‎src/backend/replication/walsender.c

Copy file name to clipboardExpand all lines: src/backend/replication/walsender.c
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,12 +1831,6 @@ WalSndWaitForWal(XLogRecPtr loc)
18311831
!NeedToWaitForWal(loc, RecentFlushPtr, &wait_event))
18321832
return RecentFlushPtr;
18331833

1834-
/* Get a more recent flush pointer. */
1835-
if (!RecoveryInProgress())
1836-
RecentFlushPtr = GetFlushRecPtr(NULL);
1837-
else
1838-
RecentFlushPtr = GetXLogReplayRecPtr(NULL);
1839-
18401834
/*
18411835
* Within the loop, we wait for the necessary WALs to be flushed to disk
18421836
* first, followed by waiting for standbys to catch up if there are enough

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.