Match the buffer usage tracking for leader and worker backends.
authorAmit Kapila <akapila@postgresql.org>
Fri, 3 Aug 2018 04:37:56 +0000 (10:07 +0530)
committerAmit Kapila <akapila@postgresql.org>
Fri, 3 Aug 2018 04:37:56 +0000 (10:07 +0530)
commit7124c93fb54fdd3bcf98e29392fc66ddb81f5343
tree55c213b2edc0be57b9e7d4e311c1865a0268b809
parent764e21db0e2eb384785f94bc0087229318250f9e
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
src/backend/executor/execParallel.c