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 <[email protected]> Reviewed-by: Tatsuya Kawata <[email protected]> Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/caaphdvouwcms-b27mpdkd5_ruftanvrxpgn9u3qoqbbihk+...@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(-)
