Re: Use XLogRecPtrIsValid() instead of negated XLogRecPtrIsInvalid - Mailing list pgsql-hackers

From Amul Sul
Subject Re: Use XLogRecPtrIsValid() instead of negated XLogRecPtrIsInvalid
Date
Msg-id CAAJ_b975xBx_No+i69F5EAcRgDaT-G0h=XPFrqL1n_zBSwKSRQ@mail.gmail.com
Whole thread
In response to Re: Use XLogRecPtrIsValid() instead of negated XLogRecPtrIsInvalid  (vignesh C <vignesh21@gmail.com>)
Responses Re: Use XLogRecPtrIsValid() instead of negated XLogRecPtrIsInvalid
List pgsql-hackers
On Thu, Apr 16, 2026 at 4:25 PM vignesh C <vignesh21@gmail.com> wrote:
>
> On Thu, 16 Apr 2026 at 09:42, Fujii Masao <masao.fujii@gmail.com> wrote:
> >
> > On Mon, Apr 13, 2026 at 4:10 PM vignesh C <vignesh21@gmail.com> wrote:
> > > I felt these also should be updated, the attached v2 version patch
> > > includes the changes for the same.
> >
> > Thanks for updating the patch!
> >
> > -       applyPtr = (latestApplyPtr == InvalidXLogRecPtr) ?
> > +       applyPtr = (XLogRecPtrIsInvalid(latestApplyPtr)) ?
> >
> > XLogRecPtrIsValid() should be used here, instead?

The outer parentheses do not seem to be needed, as
XLogRecPtrIsInvalid() already includes them.

Other than that, the v3 patch looks good to me.

Regards,
Amul



pgsql-hackers by date:

Previous
From: lakshmi
Date:
Subject: Re: Pgbench: remove synchronous prepare
Next
From: Chengpeng Yan
Date:
Subject: [PATCH] Fix hashed ScalarArrayOp semantics for NULL LHS with non-strict comparators