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 1p2ZJZ-0004BT-Aw for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Dec 2022 14:52:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p2ZJY-0001KI-6a for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Dec 2022 14:52:56 +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 1p2ZJX-0001K9-TS for pgsql-hackers@lists.postgresql.org; Tue, 06 Dec 2022 14:52:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p2ZJV-0001BF-VD for pgsql-hackers@lists.postgresql.org; Tue, 06 Dec 2022 14:52:55 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2B6Eqpbp3615863; Tue, 6 Dec 2022 09:52:51 -0500 From: Tom Lane To: Ashutosh Bapat cc: pgsql-hackers@lists.postgresql.org Subject: Re: Missing MaterialPath support in reparameterize_path_by_child In-reply-to: References: <1854233.1669949723@sss.pgh.pa.us> <1935226.1669995790@sss.pgh.pa.us> <3175242.1670251415@sss.pgh.pa.us> Comments: In-reply-to Ashutosh Bapat message dated "Tue, 06 Dec 2022 20:07:57 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3615861.1670338371.1@sss.pgh.pa.us> Date: Tue, 06 Dec 2022 09:52:51 -0500 Message-ID: <3615862.1670338371@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ashutosh Bapat writes: > On Mon, Dec 5, 2022 at 8:13 PM Tom Lane wrote: >> I don't especially like "rel->nparts = 0" as a way of disabling >> partitionwise join ... > ... If we can not generate AppendPath for a > join relation, it means there is no way to compute child join > relations and thus the relation is not partitioned. So setting > rel->nparts = 0 is right. If we had nparts > 0 before, then it is partitioned for some value of "partitioned", so I don't entirely buy this argument. > Probably we should add macros similar to > dummy relation for marking and checking partitioned relation. I see > IS_PARTITIONED_RELATION() is defined already. Maybe we could add > mark_(un)partitioned_rel(). Hiding it behind a macro with an explanatory name would be an improvement, for sure. regards, tom lane