On Wed, 9 Oct 2024 at 20:07, Shayon Mukherjee <shay...@gmail.com> wrote: > [thinking…] Unless - we try to do support both a GUC and the ALTER INDEX > ENABLE/DISABLE grammar + isdisabled attribute on pg_index?
I just wanted to explain my point of view on this. This is my opinion and is by no means authoritative. I was interested in this patch when you proposed it as an ALTER INDEX option. I know other committers seem interested, but I personally don't have any interest in the GUC option. I think the reason I dislike it is that it's yet another not even half-baked take on planner hints (the other one being enable* GUCs). I often thought that if we ever did planner hints that it would be great to have multiple ways to specify the hints. Ordinarily, I'd expect some special comment type as the primary method to specify hints, but equally, it would be nice to be able to specify them in other ways. e.g. a GUC to have them apply to more than just 1 query. Useful for things such as "don't use index X". Now, I'm not suggesting you go off and code up planner hints. That's a huge project. I'm just concerned that we've already got a fair bit of cruft that will be left remaining if we ever get core planner hints and a disabled_indexes GUC will just add to that. I don't feel like the ALTER INDEX method would be leftover cruft from us gaining core planner hints. Others might feel differently on that one. I feel the ALTER INDEX option is less controversial. I'll also stand by what I said earlier on this thread. If PeterG gets index skip scans done for PG18, then it's likely there's going to be lots of users considering if they still need a certain index or not after upgrading to PG18. David