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 1tNSMH-00B9Iy-CM for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Dec 2024 07:51:09 +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 1tNSME-00GD2C-O8 for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Dec 2024 07:51:07 +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 1tNSME-00GD23-Dm for pgsql-hackers@lists.postgresql.org; Tue, 17 Dec 2024 07:51:07 +0000 Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tNSMC-003Ftx-Rw for pgsql-hackers@lists.postgresql.org; Tue, 17 Dec 2024 07:51:06 +0000 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id DF02C114013C; Tue, 17 Dec 2024 02:51:03 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Tue, 17 Dec 2024 02:51:04 -0500 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=fm1; t=1734421863; x=1734508263; bh=9vwC12tsFP QwPhXyapx1p0N0bmAH84SObQNHmcVbHLM=; b=YWk0ebfccf6m0azb5XSn59lCy6 8mCfqQ/8I7vT8NeSYOPqF62nB7L0mZ70gy92c8QgCsXzijfhTaoAZODP1C+4tmQQ /p0RASltvaLXPIUBg3YRDYmcaGq84WQKTqMYDD4vGGbp0G0j4/Pw7H/iANSKW9A2 mqOdXUnrTdpV1UVLnaeucYyvcRZUZOEKMhLS5N+Yq9Ety0MC0QOBruS2XAqwaKFq 3USxExuwqPKiJ6jIfHALyKgorHdVoLrrGL3+tHSsA5qK5i8W68R+s5H6vO900uHb jBVMIGc6Zf4bLBMHokKYvWALAueP9AxSwvxZ0Cu3x417vS8EdZ4ljYwlT+sw== 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=fm1; t= 1734421863; x=1734508263; bh=9vwC12tsFPQwPhXyapx1p0N0bmAH84SObQN HmcVbHLM=; b=F3EcOQ1p3kJ4zAB3NiKrrUcgeA2Pr7agmhWy3/teI71Dazfj/Q7 Bslv4UEiPBWZCm1ySfLybjXyLEAwV++cW5Ehf7s+8Hyp8f820mruMMMvKaxK8fy0 7ods+vzuupKGLJ3PQbXG4YAdZw4WK6zdrKBcEnI5v1/VBKBuL/uVJvgkiIe4+13j zCEIWrKfhD7a4YX/cV7jgqkYEgvTebR7v38SVeWXBasZUhKzfZZ5cxqnBxFvlA8o NU4yOrx1jUFcKAFRL1puL+h254/xlbfRt9hegKOiv8RIJcFt+Xu870sC4oHMRjs5 wiDGUDTaBO/OwNN3xleazgc2h8LBssp0nyA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrleeggdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnegfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhf gggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruc eomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteet gedvvdevueeiudduveekffevvedtudelheellefftddvgeefgedtjeettdeknecuffhomh grihhnpehpohhsthhgrhdrvghsnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidpnhgspghrtg hpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepnhgrthhhrghnuggs ohhsshgrrhhtsehgmhgrihhlrdgtohhmpdhrtghpthhtoheprggushesphhguhhgrdguvg dprhgtphhtthhopegsohgvkhgvfihurhhmodhpohhsthhgrhgvshesghhmrghilhdrtgho mhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrh gvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 17 Dec 2024 02:51:01 -0500 (EST) Date: Tue, 17 Dec 2024 16:50:45 +0900 From: Michael Paquier To: Nathan Bossart Cc: Andreas 'ads' Scherbaum , Matthias van de Meent , PostgreSQL Hackers Subject: Re: Crash: invalid DSA memory alloc request Message-ID: References: <80a12d59-0d5e-4c54-866c-e69cd6536471@pgug.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="N2yG2V//StO6r2fa" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --N2yG2V//StO6r2fa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 16, 2024 at 04:18:26PM -0600, Nathan Bossart wrote: > On Mon, Dec 16, 2024 at 08:00:00AM +0100, Andreas 'ads' Scherbaum wrote: >> Can confirm that the crash no longer happens when applying your patch. >=20 > The patch looks reasonable to me. I'll commit it soon unless someone > objects. I was surprised to learn that the DSA_ALLOC_HUGE flag is only > intended to catch faulty allocation requests [0]. No objections. Most likely this issue gets by a large degree easier to reach now that we can plug into the backend custom pgstats kinds. If pgstats or an equivalent implementation uses pgstats, I don't think that we'll be able to live without lifting this limit (500k query entries are common, at 2kB each it would be enough to blow things), so using DSA_ALLOC_HUGE sounds good to me. I don't see a huge point in backpatching, FWIW. >> 20000211 >=20 > That's a lot of tables... >=20 > [0] https://postgr.es/m/28062.1487456862%40sss.pgh.pa.us And most likely don't do that. If you want to play more in this area, there is also the join-1M-tables-in-a-single-query game. -- Michael --N2yG2V//StO6r2fa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmdhLVUACgkQnvQgOdby QH3pbhAAp0FlLVRad3iWN0P7PEUKwBUo4I2gCtW6V3PZURlR3gE0EzO1F5ZfAqts aUESbrV6kTNvNL9D6mnm8Ue2wGopsEz+gYCb+eTBOLDjJUDKKBPobiXyJw1hLa4r +8UkICWwfGw6vwj8N9wgBm58J3KsiCsd7yDEdWUe4qipmPObQDNaFiDTBMVGV5ML Slb8nUEMyNufGv8o0i7V9gV9qP7PA6E1jwwq7rt0bt9w+HuxcKWhsvlo6Vz5YHzW qJZwRJbe402kFYSxdlINIScpDYdl+5/aF1JTVilXgwbJju9c6UCsCJUEwK3NQc3b IcS0rg/mS3Am9SoXket0cluH+lAeBoQcYC91xE2awNokuRNpNnN7jAvz83nN4XdJ /exIZW4x6wNehpoN8fz9MTqaBTPRb7/6P4TXTlDlby0zhvVEhtYdxmyA9Yzw2JKE C59Rly3UbgnBddXa+eiwl4B2piIj2hQiHJml6Fg+Dp+g0Xr4mcgiC6vZZk+C7K2H FtdHw/rZ8BuRiluboz49IrwG3gWjiXSHr69wGu647xEys7AXKjj9LkS7pH4Caaui uansmHO4wkLxZ3RDM6AorKWE3jfnsDgduDRPORWg9Z0jyt+sGa0nzZmr4zVd0j7x cJdHM02ZrD3efQWxYKTEhchyWu24/oU5vgNAXeQ0GZkduDikSj0= =wcii -----END PGP SIGNATURE----- --N2yG2V//StO6r2fa--