Use XLogRecPtrIsValid() instead of negated XLogRecPtrIsInvalid
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-10T06:11:35Z
Lists: pgsql-hackers
Attachments
- 0001-Remove-double-negative-XLogRecPtr-checks.patch (application/octet-stream) patch 0001
Hi, This small cleanup patch updates src/bin/pg_waldump/archive_waldump.c to use the recently introduced XLogRecPtrIsValid() helper instead of negating XLogRecPtrIsInvalid(). The current code uses double-negative checks such as: Assert(!XLogRecPtrIsInvalid(privateInfo->startptr)); if (!XLogRecPtrIsInvalid(privateInfo->endptr)) This patch changes them to: Assert(XLogRecPtrIsValid(privateInfo->startptr)); if (XLogRecPtrIsValid(privateInfo->endptr)) This improves readability without changing behavior. The attached patch has the changes for the same. Regards, Vignesh
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Use XLogRecPtrIsValid() consistently for WAL position checks
- 2fd84e2226e2 19 (unreleased) landed
-
Use XLogRecPtrIsValid() in various places
- a2b02293bc65 19 (unreleased) cited