Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8126eae

Browse files
committed
Clean up a few parallelism-related things that pgindent wants to mangle.
In nodeFuncs.c, pgindent wants to introduce spurious indentation into the definitions of planstate_tree_walker and planstate_walk_subplans. Fix that by spreading the definition out across several lines, similar to what is already done for other walker functions in that file. In execParallel.c, in the definition of SharedExecutorInstrumentation, pgindent wants to insert more whitespace between the type name and the member name. That causes it to mangle comments later on the line. Fix by moving the comments out of line. Now that we have a bit more room, add some more details that may be useful to the next person reading this code.
1 parent 360ca27 commit 8126eae

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

src/backend/executor/execParallel.c

+21-6
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,29 @@
5050

5151
#define PARALLEL_TUPLE_QUEUE_SIZE 65536
5252

53-
/* DSM structure for accumulating per-PlanState instrumentation. */
53+
/*
54+
* DSM structure for accumulating per-PlanState instrumentation.
55+
*
56+
* instrument_options: Same meaning here as in instrument.c.
57+
*
58+
* instrument_offset: Offset, relative to the start of this structure,
59+
* of the first Instrumentation object. This will depend on the length of
60+
* the plan_node_id array.
61+
*
62+
* num_workers: Number of workers.
63+
*
64+
* num_plan_nodes: Number of plan nodes.
65+
*
66+
* plan_node_id: Array of plan nodes for which we are gathering instrumentation
67+
* from parallel workers. The length of this array is given by num_plan_nodes.
68+
*/
5469
struct SharedExecutorInstrumentation
5570
{
56-
int instrument_options;
57-
int instrument_offset; /* offset of first Instrumentation struct */
58-
int num_workers; /* # of workers */
59-
int num_plan_nodes; /* # of plan nodes */
60-
int plan_node_id[FLEXIBLE_ARRAY_MEMBER]; /* array of plan node IDs */
71+
int instrument_options;
72+
int instrument_offset;
73+
int num_workers;
74+
int num_plan_nodes;
75+
int plan_node_id[FLEXIBLE_ARRAY_MEMBER];
6176
/* array of num_plan_nodes * num_workers Instrumentation objects follows */
6277
};
6378
#define GetInstrumentationArray(sei) \

src/backend/nodes/.nodeFuncs.c.swp

120 KB
Binary file not shown.

src/backend/nodes/nodeFuncs.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -3425,7 +3425,9 @@ raw_expression_tree_walker(Node *node,
34253425
* recurse into any sub-nodes it has.
34263426
*/
34273427
bool
3428-
planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context)
3428+
planstate_tree_walker(PlanState *planstate,
3429+
bool (*walker) (),
3430+
void *context)
34293431
{
34303432
Plan *plan = planstate->plan;
34313433
ListCell *lc;
@@ -3507,7 +3509,9 @@ planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context)
35073509
* Walk a list of SubPlans (or initPlans, which also use SubPlan nodes).
35083510
*/
35093511
static bool
3510-
planstate_walk_subplans(List *plans, bool (*walker) (), void *context)
3512+
planstate_walk_subplans(List *plans,
3513+
bool (*walker) (),
3514+
void *context)
35113515
{
35123516
ListCell *lc;
35133517

0 commit comments

Comments
 (0)