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 1vDjT7-00EWhk-BD for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Oct 2025 13:10:32 +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 1vDjT6-00D0iO-7E for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Oct 2025 13:10:31 +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 1vDjT5-00D0g0-Rl for pgsql-hackers@lists.postgresql.org; Tue, 28 Oct 2025 13:10:30 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vDjT3-004D1J-0N for pgsql-hackers@lists.postgresql.org; Tue, 28 Oct 2025 13:10:29 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 7613DEC050F; Tue, 28 Oct 2025 09:10:28 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Tue, 28 Oct 2025 09:10:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1761657028; x=1761743428; bh=ZLJLVvLBta 5DV7Ec5OBiiTq4LFplaYK/np1CRF4S3yY=; b=oqUHHYMFXLEimWbWAcB/SmCx2q VaF0zn7Yx3xcz4D48hay66ZmUSt7ttzH/bqD1Q5tGsT1DiaBQawSBIsNfp78XRXN OOa123V2PbTHYEXiVhm1IY5XcFabCG36YNSLSUIhsbyk5ZeM7SLFzfNOUBBDM1uh 54Z9kTsy7uB9XcyNX8EhXEXjgpBA1WF51GrgEwmxdRFfY67XgBYPVnkiCOQqFqMX Ex9Iiui4l9+D2hJR2PEEtgxuZOuTiD4yLppJFJ8x4s4IE0zCR0FW5QG3p467caXJ ej+rZH2q/wyDRojNsyj9KClZ2Cr0hlBYgLYr6Is94BjN3iFxf5BtYCpxWfUA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1761657028; x=1761743428; bh=ZLJLVvLBta5DV7Ec5OBiiTq4LFplaYK/np1 CRF4S3yY=; b=EBkOryOljtM5BPtNlhQdehaaDsHpolIDk4tP30nn6HLl2kEgpJz L9AfX6NiPlql2dMCANdwAtjSDiZ6vBAu4syi0EIX5RBKegd8wjBefHFj0QYWr5e4 Vfgglfoqv5dgUmxHG0u8RVRvJe3UfT0h1Peu5Okbe5WhXwAswNUzinJWbcrmqn0g tdywzHqzUsEGcV1oyzQvaXX68E9tOPKsI9cMlvmdNVb7TRkPiFzoXnyUkJwc1ahb vCN1xHUrKcZfbS/QGYfeGf+RwRy/lddpDJXhFzeqWbmakUHuRxX6TcSv9UHuJ3GC vNtnjTyXUdLaIBgdMr0LJZYmFQ2Fxvs/RwQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduiedtleefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohephhhlih hnnhgrkhgrsehikhhirdhfihdprhgtphhtthhopehquhgrnhiiohhnghhlihgrnhhgseih vggrhhdrnhgvthdprhgtphhtthhopegsvghrthhrrghnuggurhhouhhvohhtrdhpghesgh hmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhs rdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Oct 2025 09:10:26 -0400 (EDT) Date: Tue, 28 Oct 2025 22:10:08 +0900 From: Michael Paquier To: Heikki Linnakangas Cc: Quan Zongliang , Bertrand Drouvot , pgsql-hackers@lists.postgresql.org Subject: Re: Consistently use the XLogRecPtrIsInvalid() macro Message-ID: References: <20213178-92cd-4ab9-9699-c68cd75bae58@yeah.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NO2cHJmbQtegYYYd" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --NO2cHJmbQtegYYYd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 28, 2025 at 01:40:24PM +0200, Heikki Linnakangas wrote: > It's also a bit cumbersome that we have XLogRecPtrIsInvalid() rather than > XLogRecPtrIsValid(). That's inconsistent with OidIsValid and > TransactionIdInValid, and it leads to an awkward double negative 'if > (!XLogRecPtrIsInvalid(x))' if you want to check that 'x' is valid. >=20 > Overall I'm inclined to do nothing. But if anything, perhaps introduce > XLogRecPtrIsValid(x) and switch to that, or replace XLogRecPtrIsInvalid(x) > calls with 'x =3D=3D InvalidXLogRecPtr' 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. -- Michael --NO2cHJmbQtegYYYd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmkAwLAACgkQnvQgOdby QH3K9BAAnZmr1+Q6RxCGW82dudD1QKI3TZTQ4YwQFsJLaA+sE2unFopGFCB8Dqa/ +maTWCUd3v6NQwCq4yVv6vvHsTG6TDDhI0z+aU2vdN/+mLRTwchuXuPBe7jsl5Uz Mk6Uoeno8+A7e959wOTHN+2U9Lytlmw9R9dP+83Dt9G3HTcdws9zow35/WDq9RyN kJAK21a4a6aFuNqWKGxVaswWd9rR+tbv+ML1Rt8Mxdm7y9YcDPSstIUQizH+896N A3R3AShUEFBmMsOnahx8ue2HCCzhf3uq0/67PTka+xSTj2EnQMZRvA7H2tCWEvRA CoUxq2Lif5ghUPiBK0dokzOmat7Iqeld/vpWHTQeXCEkcu6P7fv/vXJ90PCGwCG5 fgbMFCay62TkmeBWwvnYKe4xNERkBR6Ou7/gM9qCNrxsfbyWAj+An9us6UttbTtL UykjJD972Bb6sKCu1xioI82aPMMXxP//XoirXyoeR/EPnkrX3pPu2CtMzYp/59PS jLnLlN+Zgn4087rqNhObKdZYoAxfEdxuCFPDhqImymZsuy/rJc5IHgY8hF2Uc2EW kKWo0DmSCxv6b0Yyr8LQxpGFAC3nM0NavQlFRPwyrx7U9XlfHSiNX+bhlBY4Ma1d Wn4PgvGIXbA6FXeagj0h4NZBJdpLMdpTt2jIp4i/sHZoyS7Q7ms= =79o4 -----END PGP SIGNATURE----- --NO2cHJmbQtegYYYd--