Use return value of XLogRecGetBlockTag instead of explicit block ref checks and also use XLogRecHasBlockRef/Image macros instead of explicit checks - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject Use return value of XLogRecGetBlockTag instead of explicit block ref checks and also use XLogRecHasBlockRef/Image macros instead of explicit checks
Date
Msg-id CALj2ACX7LtMUkFs0xyuyn3UBwhbXrX+is0ni7asxkG4dxB=3XQ@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi,

I think we can use the return value of XLogRecGetBlockTag instead of
an explicit check XLogRecHasBlockRef as the XLogRecGetBlockTag would
anyways return false in such a case. Also, in some places the macros
XLogRecHasBlockRef and XLogRecHasBlockImage aren't being used instead
the checks are being performed directly.

Although the above change doesn't add any value or improve any
performance but makes use of the existing code better and removes some
unnecessary/duplicate code. Attaching a small patch.

Thoughts?

Regards,
Bharath Rupireddy.

Attachment

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Move replication slot structures/enums/macros to a new header file for better usability by external tools/modules
Next
From: Andres Freund
Date:
Subject: Re: Move replication slot structures/enums/macros to a new header file for better usability by external tools/modules