diff --git a/src/backend/executor/execParallel.c b/src/backend/executor/execParallel.c index 572a77bb3a..bdc6b433e4 100644 --- a/src/backend/executor/execParallel.c +++ b/src/backend/executor/execParallel.c @@ -50,14 +50,29 @@ #define PARALLEL_TUPLE_QUEUE_SIZE 65536 -/* DSM structure for accumulating per-PlanState instrumentation. */ +/* + * DSM structure for accumulating per-PlanState instrumentation. + * + * instrument_options: Same meaning here as in instrument.c. + * + * instrument_offset: Offset, relative to the start of this structure, + * of the first Instrumentation object. This will depend on the length of + * the plan_node_id array. + * + * num_workers: Number of workers. + * + * num_plan_nodes: Number of plan nodes. + * + * plan_node_id: Array of plan nodes for which we are gathering instrumentation + * from parallel workers. The length of this array is given by num_plan_nodes. + */ struct SharedExecutorInstrumentation { - int instrument_options; - int instrument_offset; /* offset of first Instrumentation struct */ - int num_workers; /* # of workers */ - int num_plan_nodes; /* # of plan nodes */ - int plan_node_id[FLEXIBLE_ARRAY_MEMBER]; /* array of plan node IDs */ + int instrument_options; + int instrument_offset; + int num_workers; + int num_plan_nodes; + int plan_node_id[FLEXIBLE_ARRAY_MEMBER]; /* array of num_plan_nodes * num_workers Instrumentation objects follows */ }; #define GetInstrumentationArray(sei) \ diff --git a/src/backend/nodes/.nodeFuncs.c.swp b/src/backend/nodes/.nodeFuncs.c.swp new file mode 100644 index 0000000000..6f426e85ce Binary files /dev/null and b/src/backend/nodes/.nodeFuncs.c.swp differ diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c index 46af872116..7bc5be1565 100644 --- a/src/backend/nodes/nodeFuncs.c +++ b/src/backend/nodes/nodeFuncs.c @@ -3425,7 +3425,9 @@ raw_expression_tree_walker(Node *node, * recurse into any sub-nodes it has. */ bool -planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context) +planstate_tree_walker(PlanState *planstate, + bool (*walker) (), + void *context) { Plan *plan = planstate->plan; ListCell *lc; @@ -3507,7 +3509,9 @@ planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context) * Walk a list of SubPlans (or initPlans, which also use SubPlan nodes). */ static bool -planstate_walk_subplans(List *plans, bool (*walker) (), void *context) +planstate_walk_subplans(List *plans, + bool (*walker) (), + void *context) { ListCell *lc;