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 1vGvxj-008M2m-Ic for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Nov 2025 09:07:22 +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 1vGvwk-006W16-Fd for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Nov 2025 09:06:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vGvwk-006W0y-0J for pgsql-hackers@lists.postgresql.org; Thu, 06 Nov 2025 09:06:21 +0000 Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vGvwg-005gyk-2Q for pgsql-hackers@lists.postgresql.org; Thu, 06 Nov 2025 09:06:20 +0000 Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id EA88A1D00120; Thu, 6 Nov 2025 04:06:17 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Thu, 06 Nov 2025 04:06:18 -0500 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=1762419977; x= 1762506377; bh=pInHu/uJdemgM2gBELBaAZbvYs7M57g/PR8hemCm7YQ=; b=a tFlOlgrgDYGT3ULuGFcTLhGeYG6CshWV68Ha+/AbjYeEWMZEMqU1dprpu7hlFzVp JUaCR3McXl/JypvHgtwpIX2IelsYfZx/1mBWONrPMcU8lc5OQnoUnvLsRLmB6CHh /h5Ay12ZZ3r0/43ZPcAlWsJk+c0YmMRLG+Nz0p/hsq/+hhrJLu109wWU0thM3OmX SpISnda6+r8p5J0ou5ymKWk63xHa+KmB/Xom/kEGov2mfMdhGpGM8SaaEnw6yVeC 6iIqu4bHymD7cgCawkdJwLDwO2fvbOFvuyFj1EAvafjoebWXBCGQa0NnvD8m9hXR nLzQMdcglrubl9tKMP2+w== 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=1762419977; x=1762506377; bh=p InHu/uJdemgM2gBELBaAZbvYs7M57g/PR8hemCm7YQ=; b=YIpRCrDfrF3fBTAi9 yne4kZJ+iyXpHTmyy5ltzcnUQgG1vSwn2Xxi2T/S+JQ0a1exjzIPzV9XSP7IKrc2 Ol6SnAGoZZ6vlSEHMeq/ru06/DN7/t1WNeRNSBNIoi7nzScTLpJQmBRjKgPi2q5T so6zqxWboX1H9MFPrixYnJSQutDh+Dojy/qz5iEciHVQTmFTYZKxWyzcWyDcSM0u c5bHp1BNaFVfeSx/T/qGziJPBax4JJGgzoGZNmund4rdlYt87YTc4A6/rhIp+8YH wAvYSfI3xmc3RfnBaC8d4r1qA5KaWgGpCV/W6X5ezAvfAFKFo/EoU0wJ6D61PA+g cHM9A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddukeeifeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeuheduuddthfef fffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeeipdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehpvghtvghrsegvihhsvghnthhrrghuthdrohhrghdprhgtphht thhopegsvghrthhrrghnuggurhhouhhvohhtrdhpghesghhmrghilhdrtghomhdprhgtph htthhopehhlhhinhhnrghkrgesihhkihdrfhhipdhrtghpthhtohepphhgshhqlhdqhhgr tghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepmh hitghhrggvlhesphgrqhhuihgvrhdrgiihiidprhgtphhtthhopehquhgrnhiiohhnghhl ihgrnhhgseihvggrhhdrnhgvth X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Nov 2025 04:06:17 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1762419973; bh=ybYG4Jx8fosLFRWF8ycXhYlSa0obRLffryrZgCcys7A=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=EhNDvyFx0pQuLKyRJBddTCAO2MLZkl1mOE1/jflLHrdSB3hzqCGFj0sG/6V4p0mc1 gF5BDIrdpfEaUY5sWh/SURf5hBX72HpKtxT4vA7wEa9ijkofRd6esMfzuNLpouOidT DCg6kBhMg+87qeABulYMSNOM26vE75Vej2FyKFDmw5Nh6/JeNi/jT6hLMkC2NkRxMb 55yemFTb0qyI9wu2xv/rsyelMHGEuZ5Rr6iGeRIHDFB6BM42TRjjnsDA3Dmsc9IFf2 8mZFfZgTyxXxJEMnYwk7rcZkmjZ/NsrfCvzUPGlSwHi1NMMJG+PJ6elQTrPQQzoQ+1 rm4YvfMYjgToQ== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 9E9AA76; Thu, 06 Nov 2025 11:06:13 +0200 (EET) Date: Thu, 6 Nov 2025 10:06:13 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Bertrand Drouvot Cc: Peter Eisentraut , Michael Paquier , Heikki Linnakangas , Quan Zongliang , pgsql-hackers@lists.postgresql.org Subject: Re: Consistently use the XLogRecPtrIsInvalid() macro Message-ID: <202511060901.sum2b5xs6dfv@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-Nov-06, Bertrand Drouvot wrote: > Subject: [PATCH v5 1/4] Introduce XLogRecPtrIsValid() and replace > XLogRecPtrIsInvalid() calls > XLogRecPtrIsInvalid() is inconsistent with the affirmative form of other > *IsValid() macros and leads to awkward double negative. > > This commit introduces XLogRecPtrIsValid() and replace all the > XLogRecPtrIsInvalid() calls. > > It also adds a comment mentioning that new code should use XLogRecPtrIsValid() > instead of XLogRecPtrIsInvalid() and that XLogRecPtrIsInvalid() could be > deprecated in the future. I think we should do this in two steps. First, introduce XLogRecPtrIsValid(), don't use it anywhere, backpatch this one. This would alleviate potential backpatching pains when using the new macro in future bugfixes. Second, change calls of the old function to the new one, no backpatch. > From 22f02ca0618d9f2e34de8fa084127bf500d75603 Mon Sep 17 00:00:00 2001 > From: Bertrand Drouvot > Date: Mon, 3 Nov 2025 06:33:01 +0000 > Subject: [PATCH v5 2/4] Introduce PG_DEPRECATED() and deprecate > XLogRecPtrIsInvalid() The uppercase name looks a bit ugly. We use lowercase for other uses of __attribute__, e.g. pg_attribute_aligned(). Also, probably add "attribute" to the name, for consistency with those. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/