diff options
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r-- | src/backend/executor/execMain.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 1b007dc32cd..eaf6f31a154 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -289,7 +289,8 @@ standard_ExecutorStart(QueryDesc *queryDesc, int eflags) * There is no return value, but output tuples (if any) are sent to * the destination receiver specified in the QueryDesc; and the number * of tuples processed at the top level can be found in - * estate->es_processed. + * estate->es_processed. The total number of tuples processed in all + * the ExecutorRun calls can be found in estate->es_total_processed. * * We provide a function hook variable that lets loadable plugins * get control when ExecutorRun is called. Such a plugin would @@ -373,6 +374,12 @@ standard_ExecutorRun(QueryDesc *queryDesc, } /* + * Update es_total_processed to keep track of the number of tuples + * processed across multiple ExecutorRun() calls. + */ + estate->es_total_processed += estate->es_processed; + + /* * shutdown tuple receiver, if we started it */ if (sendTuples) |