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.96) (envelope-from ) id 1vlmUN-003qtX-09 for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Jan 2026 11:16:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vlmUK-004SlD-1n for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Jan 2026 11:16:33 +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.96) (envelope-from ) id 1vlmUK-004Skt-0Y for pgsql-hackers@lists.postgresql.org; Fri, 30 Jan 2026 11:16:33 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vlmUH-0009RG-2r for pgsql-hackers@lists.postgresql.org; Fri, 30 Jan 2026 11:16:32 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4806f3fc50bso20168755e9.0 for ; Fri, 30 Jan 2026 03:16:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769771789; x=1770376589; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=QRGrjzrMZrUGdcXTcqfGF56cUx41nE2En15UaPRgl6Q=; b=A1MD8vtpqa/xSMdEwhjXQXql7hR1mRKH4ryYBlxZPjlBFv1C/+0XYUBEAI4RCEvAnq MA0lNm0sZWuJS7PkY2b+y7RKY75c6U8k7pPpV9dHDzde4et1rBXxHLg5q+qKy46olUS7 GMCR/7uq1NB8NFV89Vg1t1Ekl2xulNkluPd2rCBmL9U4yfLI0CLy7XGF/LbEWJ15ekUs ureVtPIoEjPcNlevuj2+NS1FoZ7kLf5QidSteDz2+igChc4c9K35Ro5P3sUWIUtUClzh RTA2QcGJnYHi/GxBo/mcJsLIfuo6bMzpKW2fZAYV8zzBOLKP4Ztj/UzJKmAwCrELqDAa eCeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769771789; x=1770376589; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QRGrjzrMZrUGdcXTcqfGF56cUx41nE2En15UaPRgl6Q=; b=ops6IgLNyVAW2Ap5ovxCRsMZKriGqa7rL1fjXAoVcW8bLdruJjBV+9C0aSTRzQDRLb 1xJUBr1OJpkYOxfO8lJRnfYoEX/ZAvwjFTL96B3EExQyU30rs3SoO6OyHRjI10BqeRMb SG2ulcELacH/aKBPf++GfI1tKQ6fBDihsuO43XopTfgtITEKd3cxfhId/a41u8BMLMQ8 ecYssfkkwwmMEh9SiohvUqxqsEgkLNVWvoRoVmtK7SmJdz5mzCorUIl02XCZJUImmrFt i+tXuW4cyj49sDbmMqz5zTdGFVYxilIEAe5pAXM+58260TjH1HRmd9cGTjmwpRnRSuoe j5SA== X-Forwarded-Encrypted: i=1; AJvYcCUymzGwxvC2c4wHjqpVCRLhYqnfWGn7M/N6AG3w+K+kvo0wq31Q+bgRDO4fUkcBgKPSj58E9blTuvvvzEDh@lists.postgresql.org X-Gm-Message-State: AOJu0YwCJH7cZHSJQ9/k6j2fHdyUwrsRt+pSpA7iXzX5jt5m5dHrtzB3 IzMK9Fjxi2BySoOoByh5fcS/EsVong0xTUjaliYOopfU5MTgkim0AdOh X-Gm-Gg: AZuq6aKN3luWxUCQCcSeyL3Hgfesg+FtLcxAH5hX0bBL5ohuKOiDvfZnzOYbev4dYGH fy5u5DhYi7og4pk7wblfbfYOQYdhLGxIVtp8RSXg+arf6XfmFoL1SfaounUIOUflFSLq+xhIb3J G3eQoFrXAEUKjDATI/Y8gNoPzM1P1qQLWVF0+HpzpgQSg1oqDiE51isBkLTGDBg1Fdrv5/PJnJp iHmtMx40JZbxhJKmq14eumlf10aaj57S5q6GHS8sTGk2ezUWLxprpJGzYOBEAmVr6l7+gDC1K0N YGwzcirAYd/KXAXzjgKa1F87I9PkGW3lDus8+KwSzzPTBAOXkRZLZUAmAi0nt1bDQlC5ai/ftv0 lJLCHWlaPjNzhjOPxqmFRMo1WYsKCpp0WlvJXd4bQnsUm4Om+ygnhinoDx0xy+QXnFyHFHEUp9T oF8IxR1mJCljdEHp6pHJJos/VsICBZASg0zh68gFYmdhoiXApiD0O1ixGgbx4Tz4GDVDY5lVhmr i3sNs0pu3WeHl+2K08Z68YGIuPVNFSv8pYuCoRPtcWnXg== X-Received: by 2002:a05:600c:6814:b0:477:9b4a:a82 with SMTP id 5b1f17b1804b1-482db4af871mr34313845e9.35.1769771788776; Fri, 30 Jan 2026 03:16:28 -0800 (PST) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4806ce4c515sm185447075e9.11.2026.01.30.03.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jan 2026 03:16:28 -0800 (PST) Date: Fri, 30 Jan 2026 11:16:26 +0000 From: Bertrand Drouvot To: =?iso-8859-1?Q?=C1lvaro?= Herrera Cc: Peter Eisentraut , Michael Paquier , Heikki Linnakangas , Quan Zongliang , pgsql-hackers@lists.postgresql.org Subject: Re: Consistently use the XLogRecPtrIsInvalid() macro Message-ID: References: <202601291744.chmxe2jjofs6@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="31r/W+W8Qcw0VOW+" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202601291744.chmxe2jjofs6@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --31r/W+W8Qcw0VOW+ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi, On Thu, Jan 29, 2026 at 06:45:12PM +0100, Álvaro Herrera wrote: > On 2025-Nov-17, Bertrand Drouvot wrote: > > > On Mon, Nov 17, 2025 at 01:12:24PM +0000, Bertrand Drouvot wrote: > > > The script has been updated and the patch too (finding a new replacement in > > > gist.c). > > > > Finally, adding GistNSN to the game (as a typedef XLogRecPtr) gives the attached. > > I've pushed this. Thanks! I just looked at the cocci script used for that and realized (with more Coccinelle practice) that it could be simplified. It's done in [1], and lead to a few more cases discovered and fixed in the attached. I think that, with the attached, we cover them all. [1]: https://github.com/bdrouvot/coccinelle_on_pg/blob/main/replace_literal_0_assignement_with_InvalidXLogRecPtr.cocci Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com --31r/W+W8Qcw0VOW+ Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0001-Fix-other-cases-of-literal-0-instead-of-InvalidXL.patch"