| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
| Cc: | Quan Zongliang <quanzongliang(at)yeah(dot)net>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Consistently use the XLogRecPtrIsInvalid() macro |
| Date: | 2025-10-28 13:10:08 |
| Message-ID: | aQDAsFbIaj-b7Ag9@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Oct 28, 2025 at 01:40:24PM +0200, Heikki Linnakangas wrote:
> It's also a bit cumbersome that we have XLogRecPtrIsInvalid() rather than
> XLogRecPtrIsValid(). That's inconsistent with OidIsValid and
> TransactionIdInValid, and it leads to an awkward double negative 'if
> (!XLogRecPtrIsInvalid(x))' if you want to check that 'x' is valid.
>
> Overall I'm inclined to do nothing. But if anything, perhaps introduce
> XLogRecPtrIsValid(x) and switch to that, or replace XLogRecPtrIsInvalid(x)
> calls with 'x == InvalidXLogRecPtr'
The annoying part with eliminating XLogRecPtrIsInvalid() or replacing
it is that a bunch of external code would be broken, particularly
backup tools. I'd rather leave the beast alone.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Langote | 2025-10-28 13:11:46 | Re: Batching in executor |
| Previous Message | Daniil Davydov | 2025-10-28 13:09:59 | Re: POC: Parallel processing of indexes in autovacuum |