pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@kurilemu.de>
To: Michael Paquier <michael@paquier.xyz>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Quan Zongliang <quanzongliang@yeah.net>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Consistently use the XLogRecPtrIsInvalid() macro
Date: Tue, 28 Oct 2025 16:05:34 +0200
Message-ID: <202510281353.l6bip2btycse@alvherre.pgsql> (raw)
In-Reply-To: <aQDAsFbIaj-b7Ag9@paquier.xyz>
On 2025-Oct-28, Michael Paquier wrote:
> The annoying part with eliminating XLogRecPtrIsInvalid() or replacing
> it is that a bunch of external code would be broken, particularly
> backup tools. I'd rather leave the beast alone.
Well, we don't have to remove it right away. We can simply not use it.
And maybe if the compiler supports it, make a static inline function in
the header with the [[deprecated]] attribute or
__attribute__((deprecated)) so that the tool developers get a warning
and migrate to using the new one. Then in a few years we remove it.
BTW we could use Coccinelle to replace all the XLogRecPtrIsInvalid()
calls with !XLogRecPtrIsValid(), as well as all places comparing an LSN
to InvalidXLogRecPtr or literal zero.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
view thread (49+ messages) latest in thread
Message-ID: <202510281353.l6bip2btycse@alvherre.pgsql> Permalink: ../202510281353.l6bip2btycse@alvherre.pgsql/ Also on: postgresql.org/message-id/202510281353.l6bip2btycse@alvherre.pgsql ·
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-hackers@postgresql.org Cc: alvherre@kurilemu.de, michael@paquier.xyz, hlinnaka@iki.fi, quanzongliang@yeah.net, bertranddrouvot.pg@gmail.com, pgsql-hackers@lists.postgresql.org Subject: Re: Consistently use the XLogRecPtrIsInvalid() macro In-Reply-To: <202510281353.l6bip2btycse@alvherre.pgsql> * 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