Re: Confusing comment for function ExecParallelEstimate - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Confusing comment for function ExecParallelEstimate
Date
Msg-id CAA4eK1++AxvgJ-SGOgV2K=1pLuSMHS9Wxx4FokjdGR878K3MOA@mail.gmail.com
Whole thread Raw
In response to Confusing comment for function ExecParallelEstimate  ("Wu, Fei" <wufei.fnst@cn.fujitsu.com>)
Responses RE: Confusing comment for function ExecParallelEstimate  ("Wu, Fei" <wufei.fnst@cn.fujitsu.com>)
List pgsql-hackers
On Wed, Jun 5, 2019 at 9:24 AM Wu, Fei <wufei.fnst@cn.fujitsu.com> wrote:
>
> Hi, all
>
> Lately I was researching  Parallelism of Postgres 10.7(and it is same in all version), and I was confused when
readingthe comment of function ExecParallelEstimate : 
>
> (in   src/backend/executor/execParallel.c)
>
> ----------------------------------------------
>
>
>
> * While we're at it, count the number of PlanState nodes in the tree, so
>
> * we know how many SharedPlanStateInstrumentation structures we need.
>
> static bool
>
> ExecParallelEstimate(PlanState *planstate, ExecParallelEstimateContext *e)
>
> ----------------------------------------------
>
>
>
> The structure SharedPlanStateInstrumentation is not exists at all. And I noticed that the so called
“SharedPlanStateInstrumentation”
>
> maybe is the structure instrumentation now, which is used for storing information of planstate in parallelism.  The
functioncount the number 
>
> of planState nodes and stored it in ExecParallelEstimateContext-> nnodes ,then use it to Estimate space for
instrumentationstructure in 
>
> function  ExecInitParallelPlan.
>

I think here it refers to SharedExecutorInstrumentation.  This
structure is used for accumulating per-PlanState instrumentation.  So,
it is not totally wrong, but I guess we can change it to
SharedExecutorInstrumentation to avoid confusion?  What do you think?


--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: "Wu, Fei"
Date:
Subject: Confusing comment for function ExecParallelEstimate
Next
From: Noah Misch
Date:
Subject: Re: Parallel Append subplan order instability on aye-aye