aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/explain.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2024-08-21 10:14:35 -0400
committerRobert Haas <rhaas@postgresql.org>2024-08-21 10:14:35 -0400
commitc01743aa4866e13da2c54e44010abc6d5f986363 (patch)
tree7958824608ee01747277b4c7d65d06cb0d8ecde9 /src/backend/commands/explain.c
parente22253467942fdb100087787c3e1e3a8620c54b2 (diff)
downloadpostgresql-c01743aa4866e13da2c54e44010abc6d5f986363.tar.gz
postgresql-c01743aa4866e13da2c54e44010abc6d5f986363.zip
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
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r--src/backend/commands/explain.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index 5771aabf40a..11df4a04d43 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -1894,6 +1894,10 @@ ExplainNode(PlanState *planstate, List *ancestors,
if (es->format == EXPLAIN_FORMAT_TEXT)
appendStringInfoChar(es->str, '\n');
+ if (plan->disabled_nodes != 0)
+ ExplainPropertyInteger("Disabled Nodes", NULL, plan->disabled_nodes,
+ es);
+
/* prepare per-worker general execution details */
if (es->workers_state && es->verbose)
{