diff options
| author | Álvaro Herrera <alvherre@kurilemu.de> | 2025-11-06 20:33:57 +0100 |
|---|---|---|
| committer | Álvaro Herrera <alvherre@kurilemu.de> | 2025-11-06 20:33:57 +0100 |
| commit | a2b02293bc65dbb2401cb19c724f52c6ee0f2faf (patch) | |
| tree | f982dafa5b106905027b0e11fe9cdee9fc0bab6f /src/backend/access/heap/vacuumlazy.c | |
| parent | 06edbed478625829b19c35d0c17d805be588afa6 (diff) | |
Use XLogRecPtrIsValid() in various places
Now that commit 06edbed47862 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
Diffstat (limited to 'src/backend/access/heap/vacuumlazy.c')
| -rw-r--r-- | src/backend/access/heap/vacuumlazy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index 61fe623cc60..deb9a3dc0d1 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -1901,7 +1901,7 @@ lazy_scan_new_or_empty(LVRelState *vacrel, Buffer buf, BlockNumber blkno, * WAL-logged, and if not, do that now. */ if (RelationNeedsWAL(vacrel->rel) && - PageGetLSN(page) == InvalidXLogRecPtr) + !XLogRecPtrIsValid(PageGetLSN(page))) log_newpage_buffer(buf, true); PageSetAllVisible(page); |
