]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Introduce XLogRecPtrIsValid()
authorÁlvaro Herrera <alvherre@kurilemu.de>
Thu, 6 Nov 2025 18:08:29 +0000 (19:08 +0100)
committerÁlvaro Herrera <alvherre@kurilemu.de>
Thu, 6 Nov 2025 18:08:29 +0000 (19:08 +0100)
commit49b45999f3b213c00cae2ef4f42d56e88c96b709
tree58a237c85208bc976bd18c460c8ae10546bba726
parent8278737bfd0a37b68121a42a0b0a6775488adb48
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 <bertranddrouvot.pg@gmail.com>
Backpatch-through: 13
Discussion: https://postgr.es/m/aQB7EvGqrbZXrMlg@ip-10-97-1-34.eu-west-3.compute.internal
src/include/access/xlogdefs.h