Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ozoOQ-0004Ob-So for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2022 00:22:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ozoOP-0004sw-G0 for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2022 00:22:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ozoOP-0004rC-66 for pgsql-hackers@lists.postgresql.org; Tue, 29 Nov 2022 00:22:33 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ozoOM-0002Ze-OT for pgsql-hackers@postgresql.org; Tue, 29 Nov 2022 00:22:32 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id CD4385C00CB; Mon, 28 Nov 2022 19:22:28 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 28 Nov 2022 19:22:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1669681348; x=1669767748; bh=21bFxNTClI WcrndBJMvti7g8NnKidxB0AwLe/YkKN7s=; b=pTAlyrFBOIEg+/D9FQKYqZSvbb bonj9Db8KWMMDLKePK+P86aMoRBapbupqCngTIOLSxwcLw3ybjydkGXcdzCLtfU1 xrG9cFghQwOgoHQYvAp9VkolO1wMZNlnFOD55wmaPzi+u9uuJAKrow04SNqwWZZw BGaIXfKsZtHMZdNSqHV31g0jOFtY969xQnuoBcit45aF0uwJQ6gjQgxVVIBys2gb RD3O5elOv3YamE4Zzx41uw1v5wv4CBuSfx9+xQBk5jZ4JPgze3dyGFuVvvWqrbRb BqgI1xNU7BEF0c79hgsau9bxRqwQGYJMCz0elwqZF+KilGt1MD2nkR0N4/dQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1669681348; x=1669767748; bh=21bFxNTClIWcrndBJMvti7g8NnKi dxB0AwLe/YkKN7s=; b=XF84Kdo7PCJQpnB6ZQK+C+VgK6f2uHpIZjZ23efS3Yy4 1JhDNb+5HjTyvgPHfjfWORuR5Wjr0wZYF22r8efwkZWB0+PHSJxtPvMbCIrJnOxD 19IMmDArG2FRAPJX0/5pi74OHZgxtCULk0EQYjksX/BIXD/sofDwHIlgj3MHlLC6 UnnD0BmNO0Rc9eX1i2lM726TlBZ2Lz0/WNXOAHwtNU2nSUDge2xsnfkXWT+LiJi7 YzIqf9vG9qWemLav1XEO5mUDYKzyldNHmATONkiqVAiy/YSzFyYDa6jeVQsb0Tc6 /CqtVelIOxGIRpzN/mK1Z2Jn0sQjRWBiNnA9R6sfeg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrjeefgddvfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdefhedmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeegffejvefgveduvdejtddvtdei jeehudeuledvudeftdfgfeejvdekveekiedvvdenucffohhmrghinhepphhoshhtghhrvg hsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Nov 2022 19:22:25 -0500 (EST) Date: Tue, 29 Nov 2022 09:22:22 +0900 From: Michael Paquier To: Tom Lane Cc: Bruce Momjian , Robert Haas , Peter Geoghegan , Matthias van de Meent , PostgreSQL Hackers Subject: Re: Preventing indirection for IndexPageGetOpaque for known-size page special areas Message-ID: References: <765514.1669674710@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cD+r3zYG5Sj1PhDB" Content-Disposition: inline In-Reply-To: <765514.1669674710@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --cD+r3zYG5Sj1PhDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 28, 2022 at 05:31:50PM -0500, Tom Lane wrote: > After looking through this thread, I side with Robert: we should reject > the remainder of this patch. It gives up page layout flexibility that > we might want back someday. Moreover, I didn't see any hard evidence > offered that there's any actual performance gain, let alone such a > compelling gain that we should give up that flexibility for it. As far as I understand, we are talking about this one: https://www.postgresql.org/message-id/CAEze2Wj9c0abW2aRbC8JzOuUdGurO5av6SJ2= H83du6tM+Q1rHQ@mail.gmail.com After a few months looking at it again, I cannot get much excited about switching these routines from a logic where we look at the page header to something where we'd rely on the opaque structure size. I am wondering if it would be worth adding an AssertMacro() like in this one, though: https://www.postgresql.org/message-id/YkaP64JvZTMgcHtq@paquier.xyz This still uses PageGetSpecialPointer() to retrieve the pointer area =66rom the page header, but it also checks that we have a match with the structure expected by the index AM. -- Michael --cD+r3zYG5Sj1PhDB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmOFUL4ACgkQnvQgOdby QH2d4A//WsucNpPrEfjqjZJLH8a9Ta8bbMsB0xh1H1Mw/zlrzxKGlMJE6lOxmouF t0VrAFXWcJW19xM+2z21F3kY+uEkpbYeJueRgKiKbG0X52/2Wwqam12ldLjVcGL8 T+6qtKB4VaffuXj4OJrJjyEptbzr36KLio2t0ekTzDDkOfvFRUVc2vBtX81Bgts6 fWHno9d8TECHA1Wu/cbJOgdiPJV4IpAP7x0F4wSNfOmQsH2D7kH5ncsOIa2q6HrQ WVxjk1JvLB2xaBcvzZwR+VEbP1+qzLls5yO7ei9fqrkk2OD1XXhHi4Akge/s8Sd9 r1B57voRrBXFw2Vvz+RsY91nVBcaYyIz7VbWML0txXRcwYzyXb9NKWBLE3MX3czJ O31C2IoOsK1qH0p4d73IFvKHpk5Nx5c5o1kXZP7ki5AS76+AjiM0UYkNgHiTHFS7 81l4VwNhkYgYxoFxZoZdxoCuDriEIATHpx7st1K2CBnVMVGIkSf2k5jWEM/T8H9y psRhMa4wqc5vm0T3Av63zK/s6KyB+lGwzpkGEJDAAJ5sFn9kNeUS6R6DqsDPxk8o 0WBVo5Qgmw7Aa9ma6RPFU8qYEOi71hxgrrBsin33MdbL3MRYmP/LMwgbcodELZgQ PUXi0pyDH7du7zkwxuc7BX56doirnNPz7AggdZ8MebtaMxxFnbQ= =aj6N -----END PGP SIGNATURE----- --cD+r3zYG5Sj1PhDB--