pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@kurilemu.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Replace literal 0 with InvalidXLogRecPtr for XLogRecPtr assignme
Date: Thu, 29 Jan 2026 17:44:32 +0000
Message-ID: <E1vlW4F-00011e-3C@gemulon.postgresql.org> (raw)

Replace literal 0 with InvalidXLogRecPtr for XLogRecPtr assignments

Use the proper constant InvalidXLogRecPtr instead of literal 0 when
assigning XLogRecPtr variables and struct fields.

This improves code clarity by making it explicit that these are
invalid LSN values rather than ambiguous zero literals.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/aRtd2dw8FO1nNX7k@ip-10-97-1-34.eu-west-3.compute.internal

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ec317440716487753bafa4c0f8adae53e2c32446

Modified Files
--------------
src/backend/access/gist/gist.c              | 4 ++--
src/backend/access/transam/parallel.c       | 4 ++--
src/backend/access/transam/xlog.c           | 6 +++---
src/backend/access/transam/xlogprefetcher.c | 2 +-
src/backend/access/transam/xlogrecovery.c   | 6 +++---
src/backend/replication/syncrep.c           | 4 ++--
src/backend/replication/walreceiver.c       | 4 ++--
src/backend/storage/lmgr/proc.c             | 2 +-
src/bin/pg_resetwal/pg_resetwal.c           | 8 ++++----
src/bin/pg_rewind/pg_rewind.c               | 2 +-
10 files changed, 21 insertions(+), 21 deletions(-)



Message-ID: <E1vlW4F-00011e-3C@gemulon.postgresql.org>
Permalink:  ../E1vlW4F-00011e-3C@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vlW4F-00011e-3C@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: alvherre@kurilemu.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Replace literal 0 with InvalidXLogRecPtr for XLogRecPtr assignme
  In-Reply-To: <E1vlW4F-00011e-3C@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox