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 1na8ER-0001fK-C6 for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Apr 2022 03:45:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1na8EQ-0006SE-31 for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Apr 2022 03:45:50 +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 1na8EP-0006S5-Q6 for pgsql-hackers@lists.postgresql.org; Fri, 01 Apr 2022 03:45:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1na8EN-0002EG-Fw for pgsql-hackers@postgresql.org; Fri, 01 Apr 2022 03:45:48 +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 2313jjI1922567; Thu, 31 Mar 2022 23:45:45 -0400 From: Tom Lane To: Amit Langote cc: David Rowley , Robert Haas , PostgreSQL-development Subject: Re: generic plans and "initial" pruning In-reply-to: References: <215356.1647286703@sss.pgh.pa.us> Comments: In-reply-to Amit Langote message dated "Fri, 01 Apr 2022 12:09:35 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <922565.1648784745.1@sss.pgh.pa.us> Date: Thu, 31 Mar 2022 23:45:45 -0400 Message-ID: <922566.1648784745@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Amit Langote writes: > On Fri, Apr 1, 2022 at 10:32 AM David Rowley wrote: >> 1. You've changed the signature of various functions by adding >> ExecLockRelsInfo *execlockrelsinfo. I'm wondering why you didn't just >> put the ExecLockRelsInfo as a new field in PlannedStmt? > I'm worried about that churn myself and did consider this idea, though > I couldn't shake the feeling that it's maybe wrong to put something in > PlannedStmt that the planner itself doesn't produce. PlannedStmt is part of the plan tree, which MUST be read-only to the executor. This is not negotiable. However, there's other places that this data could be put, such as QueryDesc. Or for that matter, couldn't the data structure be created by the planner? (It looks like David is proposing exactly that further down.) regards, tom lane