| From: | vignesh C <vignesh21(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Use XLogRecPtrIsValid() instead of negated XLogRecPtrIsInvalid |
| Date: | 2026-04-10 06:11:35 |
| Message-ID: | CALDaNm16knMFtcqyAG3XYSkyagmVXfhaR0T=hau8UTAU0+eLQQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Remove-double-negative-XLogRecPtr-checks.patch | application/octet-stream | 1.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-04-10 06:12:41 | Re: Fix pgstat_database.c to honor passed database OIDs |
| Previous Message | Shlok Kyal | 2026-04-10 06:08:44 | Support EXCEPT for ALL SEQUENCES publications |