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 1miHyN-00021a-0D for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Nov 2021 15:14:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1miHyK-0002i3-Hp for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Nov 2021 15:14:40 +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 1miHyK-0002ht-9M for pgsql-hackers@lists.postgresql.org; Wed, 03 Nov 2021 15:14:40 +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 1miHyH-0002TB-W6 for pgsql-hackers@postgresql.org; Wed, 03 Nov 2021 15:14:39 +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 1A3FEZPS008702; Wed, 3 Nov 2021 11:14:35 -0400 From: Tom Lane To: Robert Haas cc: James Coleman , pgsql-hackers , Amit Kapila Subject: Re: Parallelize correlated subqueries that execute within each worker In-reply-to: References: Comments: In-reply-to Robert Haas message dated "Wed, 03 Nov 2021 10:48:48 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8700.1635952475.1@sss.pgh.pa.us> Date: Wed, 03 Nov 2021 11:14:35 -0400 Message-ID: <8701.1635952475@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > When I last worked on this, I had hoped that extParam or allParam > would be the thing that would answer the question: are there any > parameters used under this node that are not also set under this node? > But I seem to recall that neither seemed to be answering precisely > that question, and the lousy naming of those fields and limited > documentation of their intended purpose did not help. FWIW, I've never been very happy with those fields either. IIRC the design in that area was all Vadim's, but to the extent that there's any usable documentation of extParam/allParam, it was filled in by me while trying to understand what Vadim did. If somebody wants to step up and do a rewrite to make the planner's Param management more useful or at least easier to understand, I think that'd be great. But anyway: yeah, those fields as currently constituted don't help much. They tell you which Params are consumed by this node or its subnodes, but not where those Params came from. The planner's plan_params and outer_params fields might be more nearly the right thing, but I'm not sure they're spot-on either, nor that they're up-to-date at the point where you'd want to make decisions about Gather safety. regards, tom lane