pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Show Material node Maximum Storage for parallel workers
Date: Mon, 12 Oct 2026 09:42:53 +0000
Message-ID: <E1xGCYX-00000001ItI-228e@gemulon.postgresql.org> (raw)

Show Material node Maximum Storage for parallel workers

1eff8279d did this for the leader, but neglected to consider that the
Material node may be below a Gather or Gather Merge and have parallel
workers also participate in the execution of the Material node.

Here we add EXPLAIN ANALYZE output to show Maximum Storage per worker
and all the required shared memory related code to get those details
back to the leader from each worker.

Because the prior code didn't have parallel worker processes report the
tuplestore usage details, this meant that the EXPLAIN ANALYZE output
didn't show the Maximum Storage when running debug_parallel_query =
regress.  You could argue that fixing that should be a bug fix, but
fixing it would start reporting the Maximum Storage for Material nodes
for parallel workers during parallel queries, which feels more like a
new feature than a bug fix.  The telemetery data going missing with
debug_parallel_query = regress isn't the end of the world, so let's just
fix this in master.

Author: David Rowley <dgrowleyml@gmail.com>
Reviewed-by: Tatsuya Kawata <kawatatatsuya0913@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CAApHDvoUWCms-b27MpDKd5_RUFtAnVrxPgN9u3QoQbBihk+S6g@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/commands/explain.c         |  36 +++++++++--
src/backend/executor/execParallel.c    |  17 +++++
src/backend/executor/nodeMaterial.c    | 110 +++++++++++++++++++++++++++++++++
src/include/executor/instrument_node.h |  21 +++++++
src/include/executor/nodeMaterial.h    |   7 +++
src/include/nodes/execnodes.h          |   1 +
src/tools/pgindent/typedefs.list       |   2 +
7 files changed, 189 insertions(+), 5 deletions(-)



Message-ID: <E1xGCYX-00000001ItI-228e@gemulon.postgresql.org>
Permalink:  ../E1xGCYX-00000001ItI-228e@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xGCYX-00000001ItI-228e@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org
  Subject: Re: pgsql: Show Material node Maximum Storage for parallel workers
  In-Reply-To: <E1xGCYX-00000001ItI-228e@gemulon.postgresql.org>
  References: <E1xGCYX-00000001ItI-228e@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox