Re: On disable_cost
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Alena Rybakina <a.rybakina@postgrespro.ru>,
Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Heikki Linnakangas <hlinnaka@iki.fi>,
Peter Geoghegan <pg@bowt.ie>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-10-28T23:21:30Z
Lists: pgsql-hackers
Attachments
- disabled_docs_v3.patch (application/octet-stream) patch v3
On Sat, 19 Oct 2024 at 01:09, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> Here is my attempt on that paragraph:
>
> When using the enable/disable flags to disable plan node types, many of
> the flags only discourage the use of the corresponding plan node and don't
> outright disallow the planner's ability to use the plan node type.
> Otherwise, certain queries could not be executed for lack of an alternative
> to using a disabled plan node. As a consequence, it is possible that the
> planner chooses a plan using a node that has been disabled. When this
> happens, the <command>EXPLAIN</command> output will indicate this fact.
I think that looks pretty good. However, I would like to keep the part
about the possibility of disabled nodes still being used is on
purpose. Mostly just to make it clear that it's not a bug. We get so
many false bug reports that I feel it's worthwhile mentioning that
explicitly.
Maybe since you dropped that sentence to shorten the paragraph, we
could instead just drop the "Otherwise, certain" sentence.
Also, the concern about using "this". How about we just write "When
the resulting plan contains a disabled node, the
<command>EXPLAIN</command> output will indicate this fact.", which
makes that self-contained.
That becomes:
When using the enable/disable flags to disable plan node types, many of
the flags only discourage the use of the corresponding plan node and don't
outright disallow the planner's ability to use the plan node type. This
is by design so that the planner still maintains the ability to form a
plan for a given query. When the resulting plan contains a disabled node,
the <command>EXPLAIN</command> output will indicate this fact.
David
Commits
-
Doc: add detail about EXPLAIN's "Disabled" property
- 84b8fccbe5c2 18.0 landed
-
Adjust EXPLAIN's output for disabled nodes
- 161320b4b960 18.0 landed
-
Fix order of parameters in a cost_sort call
- 87b6c3c0b703 18.0 landed
-
Show number of disabled nodes in EXPLAIN ANALYZE output.
- c01743aa4866 18.0 landed
-
Treat number of disabled nodes in a path as a separate cost metric.
- e22253467942 18.0 landed
-
Remove grotty use of disable_cost for TID scan plans.
- e4326fbc60c4 18.0 landed