Re: Explain buffers wrong counter with parallel plans

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Adrien Nayrat <adrien.nayrat@anayrat.info>
Cc: Andres Freund <andres@anarazel.de>, Amit Kapila <amit.kapila16@gmail.com>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2018-05-04T17:05:49Z
Lists: pgsql-hackers
On Wed, May 2, 2018 at 11:37 AM, Adrien Nayrat
<adrien.nayrat@anayrat.info> wrote:
> In 9.6 gather node reports sum of buffers for main process + workers. In 10,
> gather node only reports buffers from the main process.

Oh, really?  Well, that sounds like a bug.  Amit seems to think it's
expected behavior, but I don't know why it should be.  The commit
message makes it sound like it's just refactoring, but in fact it
seems to have made a significant behavior change that doesn't look
very desirable.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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.