Confusing comment for function ExecParallelEstimate
Wu, Fei <wufei.fnst@cn.fujitsu.com>
From: "Wu, Fei" <wufei.fnst@cn.fujitsu.com>
To: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2019-06-05T03:54:18Z
Lists: pgsql-hackers
Hi, all
Lately I was researching Parallelism of Postgres 10.7(and it is same in all version), and I was confused when reading the 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 function count the number
of planState nodes and stored it in ExecParallelEstimateContext-> nnodes ,then use it to Estimate space for instrumentation structure in
function ExecInitParallelPlan.
So, I think the comment is out of date now, isn’t it?
Maybe we can modified this piece of comment from “SharedPlanStateInstrumentation” to “instrumentation” for clear
--
Best Regards
-----------------------------------------------------
Wu Fei
Development Department II
Software Division III
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
Nanjing, 210012, China
TEL : +86+25-86630566-9356
COINS: 7998-9356
FAX: +86+25-83317685
MAIL:wufei.fnst@cn.fujitsu.com
http://www.fujitsu.com/cn/fnst/
---------------------------------------------------
Commits
-
Fix inconsistency in comments atop ExecParallelEstimate.
- 5afb57038f33 9.6.14 landed
- fac1ed274293 10.9 landed
- 17aa054a7996 11.4 landed
- d8261595bc6f 12.0 landed
-
Allow EXPLAIN (ANALYZE, VERBOSE) to display per-worker statistics.
- b287df70e408 9.6.0 cited
-
Parallel executor support.
- d1b7c1ffe72e 9.6.0 cited