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 1pmxVU-00026v-JI for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Apr 2023 14:01:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pmxVS-0006Ap-P9 for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Apr 2023 14:00:58 +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 1pmxVS-0006Ad-Et for pgsql-hackers@lists.postgresql.org; Thu, 13 Apr 2023 14:00:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pmxVP-002eSJ-CA for pgsql-hackers@lists.postgresql.org; Thu, 13 Apr 2023 14:00:57 +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 33DE0pwp1315907; Thu, 13 Apr 2023 10:00:51 -0400 From: Tom Lane To: Richard Guo cc: pgsql-hackers@lists.postgresql.org Subject: Re: Allowing parallel-safe initplans In-reply-to: References: <1129530.1681317832@sss.pgh.pa.us> Comments: In-reply-to Richard Guo message dated "Thu, 13 Apr 2023 16:23:06 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1315905.1681394451.1@sss.pgh.pa.us> Date: Thu, 13 Apr 2023 10:00:51 -0400 Message-ID: <1315906.1681394451@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Richard Guo writes: > * For the diff in standard_planner, I was wondering why not move the > initPlans up to the Gather node, just as we did before. So I tried that > way but did not notice the breakage of regression tests as stated in the > comments. Would you please confirm that? Try it with debug_parallel_query = regress. > * Not related to this patch. In SS_make_initplan_from_plan, the comment > says that the node's parParam and args lists remain empty. I wonder if > we need to explicitly set node->parParam and node->args to NIL before > that comment, or can we depend on makeNode to initialize them to NIL? I'm generally a fan of explicitly initializing fields, but the basic argument for that is greppability. That comment serves the purpose, so I don't feel a big need to change it. regards, tom lane