From c01743aa4866e13da2c54e44010abc6d5f986363 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Wed, 21 Aug 2024 10:14:35 -0400 Subject: 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 --- src/backend/commands/explain.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/backend/commands/explain.c') 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) { -- cgit v1.2.3