Confusing comment for function ExecParallelEstimate

From: "Wu, Fei" <wufei(dot)fnst(at)cn(dot)fujitsu(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Confusing comment for function ExecParallelEstimate
Date: 2019-06-05 03:54:18
Message-ID: 52E6E0843B9D774C8C73D6CF64402F0562215EB2@G08CNEXMBPEKD02.g08.fujitsu.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(dot)fnst(at)cn(dot)fujitsu(dot)com
http://www.fujitsu.com/cn/fnst/
---------------------------------------------------

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2019-06-05 04:20:01 Re: Confusing comment for function ExecParallelEstimate
Previous Message Masahiko Sawada 2019-06-05 02:54:04 Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)