On Tue, Jul 2, 2024 at 2:37 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > Robert Haas <robertmh...@gmail.com> writes: > > What happens right now is: > > > - If you set enable_indexscan=false, then disable_cost is added to the > > cost of index scan paths and the cost of index-only scan paths. > > > - If you set enable_indexonlyscan=false, then index-only scan paths > > are not generated at all. > > Hm. The first part of that seems pretty weird to me --- why don't > we simply not generate the paths at all? There is no case AFAIR > where that would prevent us from generating a valid plan.
Well, yeah. What the patch does is: if you set either enable_indexscan=false or enable_indexonlyscan=false, then the corresponding path type is not generated, and the other is unaffected. To me, that seems like the logical way to clean this up. One could argue for other things, of course. And maybe those other things are fine, if they're properly justified and documented. -- Robert Haas EDB: http://www.enterprisedb.com