Re: Explain buffers wrong counter with parallel plans

Adrien NAYRAT <adrien.nayrat@anayrat.info>

From: Adrien Nayrat <adrien.nayrat@anayrat.info>
To: Robert Haas <robertmhaas@gmail.com>, Andres Freund <andres@anarazel.de>
Cc: Amit Kapila <amit.kapila16@gmail.com>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2018-05-02T15:37:39Z
Lists: pgsql-hackers
Hi,

On 05/02/2018 05:22 PM, Robert Haas wrote:
> On Tue, May 1, 2018 at 4:57 PM, Andres Freund <andres@anarazel.de> wrote:
>> Robert, you added this as an open item. I don't think it's clear that
>> there's a bug here, and even less clear that it's something new for
>> v11. Am I understanding that right?  Should we close this open item?
> 
> Yeah, I added it in response to the original post, but it sounds like
> this is just another case of somebody being confused by the fact that
> EXPLAIN divides the row counts, startup time, total time, and number
> of rows filtered by the loop count.  So it's not an open item.

To precise, I am not confused by these counters. They do not change between 9.6
and 10.

I am confused by buffers counter which are differents between 9.6 and 10.

In 9.6 gather node reports sum of buffers for main process + workers. In 10,
gather node only reports buffers from the main process.


Thanks,


-- 
Adrien


Commits

  1. Adjust comment atop ExecShutdownNode.

  2. Prohibit shutting down resources if there is a possibility of back up.

  3. Fix buffer usage stats for parallel nodes.

  4. Match the buffer usage tracking for leader and worker backends.

  5. Improve division of labor between execParallel.c and nodeGather[Merge].c.