Introduce XLogRecPtrIsValid()
authorÁlvaro Herrera <[email protected]>
Thu, 6 Nov 2025 18:08:29 +0000 (19:08 +0100)
committerÁlvaro Herrera <[email protected]>
Thu, 6 Nov 2025 18:08:29 +0000 (19:08 +0100)
commit20bafb0972882eaf0fb50349fc4023e1e5505a57
treeacaf23f7837d6acd2c0a6ee4382ad9424369cdb9
parent3717849e622d6d38be8f021cf230903d70926d5a
Introduce XLogRecPtrIsValid()

XLogRecPtrIsInvalid() is inconsistent with the affirmative form of
macros used for other datatypes, and leads to awkward double negatives
in a few places.  This commit introduces XLogRecPtrIsValid(), which
allows code to be written more naturally.

This patch only adds the new macro.  XLogRecPtrIsInvalid() is left in
place, and all existing callers remain untouched.  This means all
supported branches can accept hypothetical bug fixes that use the new
macro, and at the same time any code that compiled with the original
formulation will continue to silently compile just fine.

Author: Bertrand Drouvot <[email protected]>
Backpatch-through: 13
Discussion: https://postgr.es/m/[email protected]
src/include/access/xlogdefs.h