pgsql: Fix buffer usage stats for nodes above Gather Merge.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix buffer usage stats for nodes above Gather Merge.
Date: 2020-07-25 05:37:05
Message-ID: E1jzCrp-0000P5-5A@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix buffer usage stats for nodes above Gather Merge.

Commit 85c9d347 addressed a similar problem for Gather and Gather
Merge nodes but forgot to account for nodes above parallel nodes. This
still works for nodes above Gather node because we shut down the workers
for Gather node as soon as there are no more tuples. We can do a similar
thing for Gather Merge as well but it seems better to account for stats
during nodes shutdown after completing the execution.

Reported-by: Stéphane Lorek, Jehan-Guillaume de Rorthais
Author: Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>
Reviewed-by: Amit Kapila
Backpatch-through: 10, where it was introduced
Discussion: https://postgr.es/m/20200718160206.584532a2@firost

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2a2494229a709b880a6db82d8b267017fccf671f

Modified Files
--------------
src/backend/executor/execProcnode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-07-25 16:55:23 pgsql: Mark built-in coercion functions as leakproof where possible.
Previous Message Tom Lane 2020-07-24 19:44:08 pgsql: Replace TS_execute's TS_EXEC_CALC_NOT flag with TS_EXEC_SKIP_NOT