Re: On disable_cost

Finnerty, Jim <jfinnert@amazon.com>

From: Jim Finnerty <jfinnert@amazon.com>
To: pgsql-hackers@postgresql.org
Date: 2019-11-01T16:30:52Z
Lists: pgsql-hackers
re: coping with adding disable_cost more than once

Another option would be to have a 2-part Cost structure.  If disable_cost is
ever added to the Cost, then you set a flag recording this.  If any plans
exist that have no disable_costs added to them, then the planner chooses the
minimum cost among those, otherwise you choose the minimum cost path.



-----
Jim Finnerty, AWS, Amazon Aurora PostgreSQL
--
Sent from: https://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html



Commits

  1. Doc: add detail about EXPLAIN's "Disabled" property

  2. Adjust EXPLAIN's output for disabled nodes

  3. Fix order of parameters in a cost_sort call

  4. Show number of disabled nodes in EXPLAIN ANALYZE output.

  5. Treat number of disabled nodes in a path as a separate cost metric.

  6. Remove grotty use of disable_cost for TID scan plans.