Commit 8126eaee authored by Robert Haas's avatar Robert Haas

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.
parent 360ca27a
...@@ -50,14 +50,29 @@ ...@@ -50,14 +50,29 @@
#define PARALLEL_TUPLE_QUEUE_SIZE 65536 #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 struct SharedExecutorInstrumentation
{ {
int instrument_options; int instrument_options;
int instrument_offset; /* offset of first Instrumentation struct */ int instrument_offset;
int num_workers; /* # of workers */ int num_workers;
int num_plan_nodes; /* # of plan nodes */ int num_plan_nodes;
int plan_node_id[FLEXIBLE_ARRAY_MEMBER]; /* array of plan node IDs */ int plan_node_id[FLEXIBLE_ARRAY_MEMBER];
/* array of num_plan_nodes * num_workers Instrumentation objects follows */ /* array of num_plan_nodes * num_workers Instrumentation objects follows */
}; };
#define GetInstrumentationArray(sei) \ #define GetInstrumentationArray(sei) \
......
...@@ -3425,7 +3425,9 @@ raw_expression_tree_walker(Node *node, ...@@ -3425,7 +3425,9 @@ raw_expression_tree_walker(Node *node,
* recurse into any sub-nodes it has. * recurse into any sub-nodes it has.
*/ */
bool bool
planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context) planstate_tree_walker(PlanState *planstate,
bool (*walker) (),
void *context)
{ {
Plan *plan = planstate->plan; Plan *plan = planstate->plan;
ListCell *lc; ListCell *lc;
...@@ -3507,7 +3509,9 @@ planstate_tree_walker(PlanState *planstate, bool (*walker) (), void *context) ...@@ -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). * Walk a list of SubPlans (or initPlans, which also use SubPlan nodes).
*/ */
static bool static bool
planstate_walk_subplans(List *plans, bool (*walker) (), void *context) planstate_walk_subplans(List *plans,
bool (*walker) (),
void *context)
{ {
ListCell *lc; ListCell *lc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment