summaryrefslogtreecommitdiff
path: root/contrib/spi
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2025-09-30 09:38:32 +0900
committerMichael Paquier <michael@paquier.xyz>2025-09-30 09:38:32 +0900
commitbb68cde4136b02a7e51e8876891cd0a61c5726ca (patch)
tree889dfdf7d6db09c3a952ed1270a27983f77db1ff /contrib/spi
parent3cc689f833b1c9c5b52f1fe07c0e0fd817e23c8b (diff)
Reorder XLogNeedsFlush() checks to be more consistentHEADorigin/masterorigin/HEADmaster
During recovery, XLogNeedsFlush() checks the minimum recovery LSN point instead of the flush LSN point. The same condition checks are used when updating the minimum recovery point in UpdateMinRecoveryPoint(), but are written in reverse order. This commit makes the order of the checks consistent between XLogNeedsFlush() and UpdateMinRecoveryPoint(), improving the code clarity. Note that the second check (as ordered by this commit) relies on InRecovery, which is true only in the startup process. So this makes XLogNeedsFlush() cheaper in the startup process with the first check acting as a shortcut while doing crash recovery, where LocalMinRecoveryPoint is an invalid LSN. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com> Discussion: https://postgr.es/m/aMIHNRTP6Wj6vw1s%40paquier.xyz
Diffstat (limited to 'contrib/spi')
0 files changed, 0 insertions, 0 deletions