mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Use XLogRecPtrIsValid() in various places
Now that commit 06edbed478 has introduced XLogRecPtrIsValid(), we can
use that instead of:
- XLogRecPtrIsInvalid()
- direct comparisons with InvalidXLogRecPtr
- direct comparisons with literal 0
This makes the code more consistent.
Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/aQB7EvGqrbZXrMlg@ip-10-97-1-34.eu-west-3.compute.internal
This commit is contained in:
@@ -937,7 +937,7 @@ SlruPhysicalWritePage(SlruCtl ctl, int64 pageno, int slotno, SlruWriteAll fdata)
|
||||
max_lsn = this_lsn;
|
||||
}
|
||||
|
||||
if (!XLogRecPtrIsInvalid(max_lsn))
|
||||
if (XLogRecPtrIsValid(max_lsn))
|
||||
{
|
||||
/*
|
||||
* As noted above, elog(ERROR) is not acceptable here, so if
|
||||
|
||||
Reference in New Issue
Block a user