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 1uHHtK-00Gz9T-He for pgsql-hackers@arkaria.postgresql.org; Tue, 20 May 2025 08:00:02 +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 1uHHtJ-005UtT-LU for pgsql-hackers@arkaria.postgresql.org; Tue, 20 May 2025 08:00:01 +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 1uHHtJ-005UtI-By for pgsql-hackers@lists.postgresql.org; Tue, 20 May 2025 08:00:01 +0000 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uHHtG-002ihB-0i for pgsql-hackers@postgresql.org; Tue, 20 May 2025 08:00:00 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id B5B75442CE; Tue, 20 May 2025 07:59:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vondra.me; s=gm1; t=1747727995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e65QEba940LYyNbqwPFil0VJps+mRT6USW1rmsxnjig=; b=enZlFQGAs+52nD4H4eBRByLJgnb+pNlUEpCkUQUTUwH9kWvqQeo/0VY917KVNKf8fVSlhn SYw9Ce/IrlCK24Ra+9dS3KPh9tP6dYea2B6YgnOez+YfOTIsl97/Ic/v0rSBKlq3r8h1zT J0i/9i2aajgZh8KCWDv/hJGYP119ZD/4DEbvfV1ClHNUvo3PX+w1p+0dno+L/qQhDTn6eY mIfksIxo1caYu4G4AId/F6EkI/pOBhTJrHDvZch1L5+tuoIqYC7Oqv743xg/SuC4kxJHfI 3DublE05AmbgW818AeFn8Zm/h3deARgtVx/si3mpft8okmQSxalFJ9z47HR9ng== Message-ID: <668eb809-cf43-4d93-b1a7-04d9f865960b@vondra.me> Date: Tue, 20 May 2025 09:59:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: generic plans and "initial" pruning To: Tom Lane , Amit Langote Cc: Tender Wang , Alexander Lakhin , Robert Haas , Alvaro Herrera , Andres Freund , Daniel Gustafsson , David Rowley , PostgreSQL Hackers , Thom Brown References: <7! 4839af6-aadc-4f60-ae77-ae65f94bf607@gmail.com> <605328.1747710381@sss.pgh.pa.us> Content-Language: en-US From: Tomas Vondra In-Reply-To: <605328.1747710381@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdefvdefjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepvfhomhgrshcugghonhgurhgruceothhomhgrshesvhhonhgurhgrrdhmvgeqnecuggftrfgrthhtvghrnhepveetgffgieeuleehleekudejvefggeejgeeukeejgffgjeeihfdtudetheejfeeknecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucfkphepkeeirdegledrvdeftddrvddtieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeekiedrgeelrddvfedtrddvtdeipdhhvghloheplgdutddrudefjedrtddrvdgnpdhmrghilhhfrhhomhepthhomhgrshesvhhonhgurhgrrdhmvgdpnhgspghrtghpthhtohepuddupdhrtghpthhtohepthhglhesshhsshdrphhghhdrphgrrdhushdprhgtphhtthhopegrmhhithhlrghnghhothgvtdelsehgmhgrihhlrdgtohhmpdhrtghpthhtohepthhnughrfigrnhhgsehgmhgrihhlrdgtohhmpdhrtghpthhtohepvgigtghluhhsihhonhesghhmrghilhdrtghomhdprhgtphhtthhopehrohgsvghrthhmhhgrrghssehgmhgrihhlrdgtohhmpdhrtghpthhto heprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdprhgtphhtthhopegrnhgurhgvshesrghnrghrrgiivghlrdguvgdprhgtphhtthhopegurghnihgvlheshigvshhqlhdrshgv X-GND-Sasl: tomas@vondra.me List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 5/20/25 05:06, Tom Lane wrote: > Amit Langote writes: >> Pushed after some tweaks to comments and the test case. > > My attention was drawn to commit 525392d57 after observing that > Valgrind complained about a memory leak in some code that commit added > to BuildCachedPlan(). I tried to make sense of said code so I could > remove the leak, and eventually arrived at the attached patch, which > is part of a series of leak-fixing things hence the high sequence > number. > > Unfortunately, the bad things I speculated about in the added comments > seem to be reality. The second attached file is a test case that > triggers > > ... FYI I added this as a PG18 open item: https://wiki.postgresql.org/wiki/PostgreSQL_18_Open_Items regards -- Tomas Vondra