diff options
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r-- | src/backend/executor/execMain.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index cc9a594cba5..5ca856fd279 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -52,6 +52,7 @@ #include "miscadmin.h" #include "nodes/queryjumble.h" #include "parser/parse_relation.h" +#include "pgstat.h" #include "rewrite/rewriteHandler.h" #include "tcop/utility.h" #include "utils/acl.h" @@ -483,6 +484,10 @@ standard_ExecutorEnd(QueryDesc *queryDesc) Assert(estate != NULL); + if (estate->es_parallel_workers_to_launch > 0) + pgstat_update_parallel_workers_stats((PgStat_Counter) estate->es_parallel_workers_to_launch, + (PgStat_Counter) estate->es_parallel_workers_launched); + /* * Check that ExecutorFinish was called, unless in EXPLAIN-only mode. This * Assert is needed because ExecutorFinish is new as of 9.1, and callers |