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