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 1p0RZ7-0000Bu-Ah for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Nov 2022 18:12:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p0RZ6-0004QR-1Q for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Nov 2022 18:12:12 +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 1p0RZ5-0004Pi-O4 for pgsql-hackers@lists.postgresql.org; Wed, 30 Nov 2022 18:12:11 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p0RZ2-00028f-N9 for pgsql-hackers@postgresql.org; Wed, 30 Nov 2022 18:12:10 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E286D5C00BD; Wed, 30 Nov 2022 13:12:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 30 Nov 2022 13:12:06 -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=fm1; t=1669831926; x=1669918326; bh=T Oski4mg/rh2M9ygWBGYUk77my4GUZDIVX8/SXgDK4M=; b=LvK4VDhRQBuf6ROrN w947NgjZuXxK93yc+KacJs4WwlDfVcyEn8dhwvMrF0Ov02Gc1exVBkgK3C2AI8aA NyaWK9BmwdS69qcLx37+xReJshbWVXRM66Ql5xQ042BUq/g2rVqtZ4EkufVbDz2e hQCuP8DPkL93K9JevvDz42nRHd4AfG1zGWs0h9FW+oEEg/eNFUUd1+7wPqFThSCy /4AKdeCa2N6RxQ9Nlu9+ZOB9yf21Js8d777eghlivjLPTGZWtM/Ds1zavUEkThDy tNlwLQuuPhk22YgJHOoEQaF7Caqg1K1ONuON3wyxB1C7RwTcHlXYcH5VuOUXGQM0 2mAmA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtdefgddutdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 30 Nov 2022 13:12:06 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id F3CD6E98; Wed, 30 Nov 2022 19:12:01 +0100 (CET) Date: Wed, 30 Nov 2022 19:12:01 +0100 From: Alvaro Herrera To: Amit Langote Cc: Robert Haas , Jacob Champion , Zhihong Yu , David Rowley , Tom Lane , PostgreSQL-development Subject: Re: generic plans and "initial" pruning Message-ID: <20221130181201.mfinyvtob3j5i2a6@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 Looking at 0001, I wonder if we should have a crosscheck that a PartitionPruneInfo you got from following an index is indeed constructed for the relation that you think it is: previously, you were always sure that the prune struct is for this node, because you followed a pointer that was set up in the node itself. Now you only have an index, and you have to trust that the index is correct. I'm not sure how to implement this, or even if it's doable at all. Keeping the OID of the partitioned table in the PartitionPruneInfo struct is easy, but I don't know how to check it in ExecInitMergeAppend and ExecInitAppend. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Find a bug in a program, and fix it, and the program will work today. Show the program how to find and fix a bug, and the program will work forever" (Oliver Silfridge)