Show number of disabled nodes in EXPLAIN ANALYZE output.
authorRobert Haas <[email protected]>
Wed, 21 Aug 2024 14:14:35 +0000 (10:14 -0400)
committerRobert Haas <[email protected]>
Wed, 21 Aug 2024 14:14:35 +0000 (10:14 -0400)
commitc01743aa4866e13da2c54e44010abc6d5f986363
tree7958824608ee01747277b4c7d65d06cb0d8ecde9
parente22253467942fdb100087787c3e1e3a8620c54b2
Show number of disabled nodes in EXPLAIN ANALYZE output.

Now that disable_cost is not included in the cost estimate, there's
no visible sign in EXPLAIN output of which plan nodes are disabled.
Fix that by propagating the number of disabled nodes from Path to
Plan, and then showing it in the EXPLAIN output.

There is some question about whether this is a desirable change.
While I personally believe that it is, it seems best to make it a
separate commit, in case we decide to back out just this part, or
rework it.

Reviewed by Andres Freund, Heikki Linnakangas, and David Rowley.

Discussion: http://postgr.es/m/CA+TgmoZ_+MS+o6NeGK2xyBv-xM+w1AfFVuHE4f_aq6ekHv7YSQ@mail.gmail.com
12 files changed:
src/backend/commands/explain.c
src/backend/optimizer/plan/createplan.c
src/include/nodes/plannodes.h
src/test/regress/expected/aggregates.out
src/test/regress/expected/btree_index.out
src/test/regress/expected/collate.icu.utf8.out
src/test/regress/expected/incremental_sort.out
src/test/regress/expected/inherit.out
src/test/regress/expected/join.out
src/test/regress/expected/memoize.out
src/test/regress/expected/select_parallel.out
src/test/regress/expected/union.out