pgsql: Match the buffer usage tracking for leader and worker backends.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Match the buffer usage tracking for leader and worker backends.
Date: 2018-08-03 05:15:54
Message-ID: E1flSRO-0006uh-D0@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Match the buffer usage tracking for leader and worker backends.

In the leader backend, we don't track the buffer usage for ExecutorStart
phase whereas in worker backend we track it for ExecutorStart phase as
well. This leads to different value for buffer usage stats for the
parallel and non-parallel query. Change the code so that worker backend
also starts tracking buffer usage after ExecutorStart.

Author: Amit Kapila and Robert Haas
Reviewed-by: Robert Haas and Andres Freund
Backpatch-through: 9.6 where this code was introduced
Discussion: https://postgr.es/m/86137f17-1dfb-42f9-7421-82fd786b04a1@anayrat.info

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ccc84a956b00bdd4c162ca8951dd1ff7890cb51f

Modified Files
--------------
src/backend/executor/execParallel.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2018-08-03 06:31:37 pgsql: Fix buffer usage stats for parallel nodes.
Previous Message Tomas Vondra 2018-08-02 09:43:45 Re: New Defects reported by Coverity Scan for PostgreSQL