Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vDkKY-00Euqp-HM for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Oct 2025 14:05:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vDkKW-00DEPp-Px for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Oct 2025 14:05:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vDkKW-00DEPe-02 for pgsql-hackers@lists.postgresql.org; Tue, 28 Oct 2025 14:05:43 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vDkKR-004hzZ-1p for pgsql-hackers@lists.postgresql.org; Tue, 28 Oct 2025 14:05:42 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 8FB06EC053A; Tue, 28 Oct 2025 10:05:37 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Tue, 28 Oct 2025 10:05:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1761660337; x= 1761746737; bh=OKyamb0hLmywr5cnort7FzPNoBLI/3ct3sZ1TkO2Oqk=; b=N hUL6ZUy7vVLgfY9qwQwRB2b/GfproRziZcNCxmMeMg90O6dmlk0gw+Sn6+btOKYF pqyWnpXAB94K1pkqOLGTBL9V1l+7LpITIYMQhW/REJPjJe7UWH4Du0UZDJ8cEQpT 8PT4WoR8fE3cNNRqKQEaxe53unj4Nn014QA/2YP6oiAktSCrZ+Up+gwCzETis9sT 6cFfsqZw6dbR1NVWJhJQpF2wYSHL2I3KxeeGs05K9vpx/ESOXMeF4hnyeo1falz8 Z+9O1w5Y6xs/CVDVAleDeGC9XZ3tb2BO97W27aoYU6L+pAHmFkysjopgfrkAoX+a Es5+EIzhjpN9fXS4RPxOw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1761660337; x=1761746737; bh=O Kyamb0hLmywr5cnort7FzPNoBLI/3ct3sZ1TkO2Oqk=; b=p2ETB1SbhcAQVfx6k goaiw6NOuU5SzVGQFQLRW5AxTa4mUUGESW4mtfUzFHipkHa2pGqf6tNOPdARg1cb rBGRFdXwp3FjccIhe01C54QzcIlAdDB5+AFtVq6DnKX7hbOh/nBaBs+9ScE533WW iLvROthgaKMkEZMhB7l5GuAfGnk2bilPCuj2gs+vm3FptvTXgNDLeQtuxPtalaph ctWhrj3ISK6wOds8VmssqexWruWbVcRjg446W6Vm9KcjYDFYUz1M1arRIambDiiC T2BeQHgzST+TRjbn5oLR17Smic8JsMq3rsKLkPLbWmR8LbdMTyaQnyjABHdJAx5C VAqMA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduiedutdehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeuheduuddthfef fffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopegsvghrthhrrghnuggurhhouhhvohhtrdhpghesghhmrghilhdr tghomhdprhgtphhtthhopehhlhhinhhnrghkrgesihhkihdrfhhipdhrtghpthhtohepph hgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhr tghpthhtohepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidprhgtphhtthhopehquh grnhiiohhnghhlihgrnhhgseihvggrhhdrnhgvth X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Oct 2025 10:05:36 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1761660334; bh=lEX97/m4ZgU1QiGdUuvom5cifH+rkbulZqnIJxqsAGM=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=3RvrxygKrLqiga78wxUtBuPCQFyOgqwZicXo4oKjU1iBFdjlNM28sDufQWpSEUgjv 6oN/h0A+L6jcmR3J51WfrEFXIuxq63rPoTre3LeJ91nmGwFoqcBRLEjbaT/qTHDVzO +Eu9+HnR3DFxiRQBtuNMuFZMmHLDF2gnb+PI52VpZkVp8UvNEi8lPkuo00BLumSUwG +9ghxw/UgkVx4nLZtu5It/o6vJMVkjujebPM7Mpaxe9h9Jatk25rmMp/sw5wJUH2c2 MafszzZw7JGxlZ24lNUZB6AzL8ukRTtYhJcI8fdWN0kPwZI430fWnU+RzkRZJtwHAK TsWdFdHdJhYPg== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 9546176; Tue, 28 Oct 2025 16:05:34 +0200 (EET) Date: Tue, 28 Oct 2025 16:05:34 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Michael Paquier Cc: Heikki Linnakangas , Quan Zongliang , Bertrand Drouvot , pgsql-hackers@lists.postgresql.org Subject: Re: Consistently use the XLogRecPtrIsInvalid() macro Message-ID: <202510281353.l6bip2btycse@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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/