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 1q9ezZ-0008BC-TG for pgsql-bugs@arkaria.postgresql.org; Thu, 15 Jun 2023 04:53:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q9ezY-0001Ns-Jo for pgsql-bugs@arkaria.postgresql.org; Thu, 15 Jun 2023 04:53:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9ezX-0001Ni-5g for pgsql-bugs@lists.postgresql.org; Thu, 15 Jun 2023 04:53:52 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q9ezT-002HkP-FF for pgsql-bugs@lists.postgresql.org; Thu, 15 Jun 2023 04:53:49 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 0AC915C00B2; Thu, 15 Jun 2023 00:53:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 15 Jun 2023 00:53:44 -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:sender :subject:subject:to:to; s=fm2; t=1686804824; x=1686891224; bh=bQ 3j9YmzMbpspNbU+12VwNncKE/ONLlVG9Dd7+gJK20=; b=A2krwjncrRczfGocAV WSfw/sI8domrns7kskDwujYLuGv93NhTsU2Il+JpOPvnJ/ynLI3fLE6TpIGE9XmP x73KBJYgoXJraadc72a4431KbQr9h041hNcQh6+l9teR7cAW1cC09v45JJPYBO1U +fYB6AI7qdr8VFzByB0vBsKDQJBEJDdiKt8g0NQ02ywTQWJhZJyVy0662SQjn3Lt e+0V01lEHrxaAAK9FQL57DBcT1loSS7rBvs6WUsIQ0IhPK2PpfR7NLmfksWkdN3p 7GMSFRdRT/fi4oxCrQZDQNy6NRpeogIJmGRVd8aAy0WzGblMQm6Qbn2aYLNndcD7 xASA== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1686804824; x=1686891224; bh=bQ3j9YmzMbpsp NbU+12VwNncKE/ONLlVG9Dd7+gJK20=; b=IseRYfaCCXnTIQoQMq/8x2aKrSv7n dYzcU31Cy0v2KgMQDlLXE6zNwgaYsL9B/xoxLgkml98pCKN3El1v3Gut256GXZhG NLo1uX2HxlrC8fHpIiI0g6nn+XB17QcLGmgMCgK/A2DAvalu/1s85cfDWrNGx1eW KgMVqkNNHc035OnONMxTLtk/HUef14HVodL25z3JwPau2jiK/99MzrFVtF09rTCZ NSYVWIx7yhE5Lkv57WV3GMlLNPz7pme28a3e9ewhhEN1o41gnc0Jw9kI1LYuJHB3 o18ny5aH/K6Rc0MmRCoFvZmNAs3C82Pl03ichJKMm7cAg+ZwEptLlCc3A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvuddgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Jun 2023 00:53:40 -0400 (EDT) Date: Thu, 15 Jun 2023 13:53:36 +0900 From: Michael Paquier To: Alexander Lakhin Cc: Richard Guo , Ankit Kumar Pandey , David Rowley , Teodor Sigaev , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17888: Incorrect memory access in gist__int_ops for an input array with many elements Message-ID: References: <17888-f72930e6b5ce8c14@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9SCGr5Ma2ByXoeSV" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --9SCGr5Ma2ByXoeSV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 14, 2023 at 01:21:40PM +0900, Michael Paquier wrote: > Likely that's something we'd better backpatch, to avoid people playing > with that too much in the back-branches. Thoughts or objections? Well, we could perhaps revisit the choice of 08ee64e to remove the LEAF flag from the data stored. However, seeing the lack of complaints for the past 18 years with users storing large arrays under gist__int_ops, spending more time on this is not really appealing, either. Or we would have heard about that because the decompression immediately breaks for this case. I have spent some time on that today, and applied what has been suggested to restrict the usage of this operator when inserting data=20 for a leaf page, so as the decompression does not get crazy when retrieving the contents of the leaf pages. -- Michael --9SCGr5Ma2ByXoeSV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmSKmVAACgkQnvQgOdby QH0n0A//a3kscnxjKHww0QwqiNsxUgcH0YrS5+a1EUOyyqBxUU1ai+vhY3HaGR/V MNO/J6dWVHLjaQSu6mej85ei3EZ/c9KW/4jGuRUAV16SDrtrd0bO+hKun7rrVrnB GK2fTWAweF53e3FQlhTuqrUtfvuwIMKxkLqio4DZu5osYIKfQLcw81w+Au4ftn2a uy/6sbW2l79H8dnfDr/wHJQg4/9uA3Xwbg1lEJJxuv5e+SHogT1fyi86Ri82uLTj xVrGZVZNOUngnqzBdCvNPOa88uA9p5tRO/4RbZ/wOu8UmSKwrzNyl5AegFgkBlSr FB2DHNeVy69SsDj1grD0lYy4/N89PH4kFWliMfU+ZHsJ0phqvL8I+PVdW0vRz/yT PFrTD9gW20JYj5uSw2MxGdckYmoNJE/mIwBPxDgUGJr6EUxuLp19v0ZwJyejn81Z gMlbZHuO97j890ZNoZohlaBb6WAgHA3g8EyYNk/32QaqoUxP0rPjaJHXJ5ejwB4X mhuZSamjKiz8+i3uQUdh//uF/xitxyCgQgMxmevDBoEnmi88q5rZGQsuC655RK/u sshrYJk+55ZY2WwZgE1H+mFy6/P61Z45kjZ7ucSQg0rKww3RuOrfZuy+iGUmRTK9 wk9bs9Oq2jXF8T4pwPcaLXT42vr4L2906ooG8oPchowkkYn3hzw= =IFuU -----END PGP SIGNATURE----- --9SCGr5Ma2ByXoeSV--