The previous display was sort of confusing, because it didn't
distinguish between the number of workers that we planned to launch
and the number that actually got launched. This has already confused
several people, so display both numbers and label them clearly.
Julien Rouhaud, reviewed by me.
if (plan->qual)
show_instrumentation_count("Rows Removed by Filter", 1,
planstate, es);
- ExplainPropertyInteger("Number of Workers",
+ ExplainPropertyInteger("Workers Planned",
gather->num_workers, es);
+ if (es->analyze)
+ {
+ int nworkers;
+
+ nworkers = ((GatherState *) planstate)->nworkers_launched;
+ ExplainPropertyInteger("Workers Launched",
+ nworkers, es);
+ }
if (gather->single_copy)
ExplainPropertyText("Single Copy",
gather->single_copy ? "true" : "false",
*/
pcxt = node->pei->pcxt;
LaunchParallelWorkers(pcxt);
+ node->nworkers_launched = pcxt->nworkers_launched;
/* Set up tuple queue readers to read the results. */
if (pcxt->nworkers_launched > 0)
struct ParallelExecutorInfo *pei;
int nreaders;
int nextreader;
+ int nworkers_launched;
struct TupleQueueReader **reader;
TupleTableSlot *funnel_slot;
bool need_to_scan_locally;