Show Parallel Bitmap Heap Scan worker stats in EXPLAIN ANALYZE
authorDavid Rowley
Tue, 9 Jul 2024 00:15:47 +0000 (12:15 +1200)
committerDavid Rowley
Tue, 9 Jul 2024 00:15:47 +0000 (12:15 +1200)
commit5a1e6df3b84c91957f80b19edb497a5eec83c403
treeb8f090995c93d9faa08d28e2a53a1b78f97d1057
parente41f7130979442362d9053d1ae24b2f87980e842
Show Parallel Bitmap Heap Scan worker stats in EXPLAIN ANALYZE

Nodes like Memoize report the cache stats for each parallel worker, so it
makes sense to show the exact and lossy pages in Parallel Bitmap Heap Scan
in a similar way.  Likewise, Sort shows the method and memory used for
each worker.

There was some discussion on whether the leader stats should include the
totals for each parallel worker or not.  I did some analysis on this to
see what other parallel node types do and it seems only Parallel Hash does
anything like this.  All the rest, per what's supported by
ExecParallelRetrieveInstrumentation() are consistent with each other.

Author: David Geier 
Author: Heikki Linnakangas 
Author: Donghang Lin 
Author: Alena Rybakina 
Author: David Rowley 
Reviewed-by: Dmitry Dolgov <[email protected]>
Reviewed-by: Michael Christofides
Reviewed-by: Robert Haas
Reviewed-by: Dilip Kumar
Reviewed-by: Tomas Vondra
Reviewed-by: Melanie Plageman
Reviewed-by: Donghang Lin
Reviewed-by: Masahiro Ikeda
Discussion: https://postgr.es/m/b3d80961-c2e5-38cc-6a32-61886cdf766d%40gmail.com
src/backend/commands/explain.c
src/backend/executor/execParallel.c
src/backend/executor/nodeBitmapHeapscan.c
src/include/executor/nodeBitmapHeapscan.h
src/include/nodes/execnodes.h
src/tools/pgindent/typedefs.list