On 12/29/21 5:07 AM, Chris Cleveland wrote:
I'm developing a new index access method. Sometimes the planner uses it and sometimes it doesn't. I'm trying to debug the process to understand why the index does or doesn't get picked up.

Is there a way to dump all of the query plans that the planner considered, along with information on why they were rejected? EXPLAIN only gives info on the plan that was actually selected.

You can enable OPTIMIZER_DEBUG option. Also the gdbpg code [1] makes our work much easier, sometimes.

[1] https://github.com/tvondra/gdbpg

--
regards,
Andrey Lepikhov
Postgres Professional


Reply via email to