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 1p3biR-0006Eb-Nt for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Dec 2022 11:38:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p3bhR-00029O-CP for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Dec 2022 11:37:53 +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 1p3bhQ-00029E-GU for pgsql-hackers@lists.postgresql.org; Fri, 09 Dec 2022 11:37:53 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p3bhN-0001tI-Sp for pgsql-hackers@postgresql.org; Fri, 09 Dec 2022 11:37:51 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 492B95C00CF; Fri, 9 Dec 2022 06:37:47 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 09 Dec 2022 06:37:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version: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=1670585867; x=1670672267; bh=o +2RUauyzgIYiPfXL7HRkY3MUmieKCjVvhuvNbfd/SA=; b=KKji9ccVf6Q1PsqVo J+v/SFkCZ6/kyLObPFpqDHqf9fk3yBN+UP78QHQWocAlKPlhGA+sVK4uHAqS9tlI vcBTZXOioGcnXlMzHgloUTVv0UVTPrxpex7bzQ4vOIkM0KIq5NKNFQvzV38os7Pc wiv0e/+8cJxtUwl6Znd47e+a1DcSQaE6qIv7IbXHzKHnwh/uU1UTLvO1NdKPH94T M+KTF4XjJofckMO87jJP0bn3ATSJ/QOPvSMmf8oTvVAbyLWbPTr8ZXJg0eZhVubA 6X4zdKno41dm/dU0FFY8URr/vwoXUQGYqcdK7bknzpkp9adQtKdDPH+JrSgiixpQ LSFeg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddvgdeftdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeejkeff gfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 Dec 2022 06:37:46 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id BAE19E98; Fri, 9 Dec 2022 12:37:44 +0100 (CET) Date: Fri, 9 Dec 2022 12:37:44 +0100 From: Alvaro Herrera To: Amit Langote Cc: Robert Haas , Jacob Champion , David Rowley , Tom Lane , PostgreSQL-development Subject: Re: generic plans and "initial" pruning Message-ID: <20221209113744.q64sfm3pazvsuo5x@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Dec-09, Amit Langote wrote: > Pruning will be done afresh on every fetch of a given cached plan when > CheckCachedPlan() is called on it, so the part_prune_results_list part > will be discarded and rebuilt as many times as the plan is executed. > You'll find a description around CachedPlanSavePartitionPruneResults() > that's in v12. I see. In that case, a separate container struct seems warranted. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Industry suffers from the managerial dogma that for the sake of stability and continuity, the company should be independent of the competence of individual employees." (E. Dijkstra)