Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8126eae

Browse files
committed
Clean up a few parallelism-related things that pgindent wants to mangle.
In nodeFuncs.c, pgindent wants to introduce spurious indentation intothe definitions of planstate_tree_walker and planstate_walk_subplans.Fix that by spreading the definition out across several lines, similarto 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 themember name. That causes it to mangle comments later on the line. Fixby 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 readingthis code.
1 parent360ca27 commit8126eae

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

‎src/backend/executor/execParallel.c

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,29 @@
5050

5151
#definePARALLEL_TUPLE_QUEUE_SIZE65536
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
structSharedExecutorInstrumentation
5570
{
56-
intinstrument_options;
57-
intinstrument_offset;/* offset of first Instrumentation struct */
58-
intnum_workers;/* # of workers */
59-
intnum_plan_nodes;/* # of plan nodes */
60-
intplan_node_id[FLEXIBLE_ARRAY_MEMBER];/* array of plan node IDs */
71+
intinstrument_options;
72+
intinstrument_offset;
73+
intnum_workers;
74+
intnum_plan_nodes;
75+
intplan_node_id[FLEXIBLE_ARRAY_MEMBER];
6176
/* array of num_plan_nodes * num_workers Instrumentation objects follows */
6277
};
6378
#defineGetInstrumentationArray(sei) \

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

120 KB
Binary file not shown.

‎src/backend/nodes/nodeFuncs.c

Lines changed: 6 additions & 2 deletions
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
staticbool
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)

[8]ページ先頭

©2009-2025 Movatter.jp