1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

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
This commit is contained in:
Robert Haas
2024-08-21 10:14:35 -04:00
parent e222534679
commit c01743aa48
12 changed files with 59 additions and 15 deletions

View File

@ -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)
{