Re: [PATCH] Proposal to Enable/Disable Index using ALTER INDEX
От | David Rowley |
---|---|
Тема | Re: [PATCH] Proposal to Enable/Disable Index using ALTER INDEX |
Дата | |
Msg-id | CAApHDvo2nJDMN-ndCM9E9eP5PC73UeBXO7KRj_aO8eiebre-VQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH] Proposal to Enable/Disable Index using ALTER INDEX (Sami Imseih <samimseih@gmail.com>) |
Ответы |
Re: [PATCH] Proposal to Enable/Disable Index using ALTER INDEX
Re: [PATCH] Proposal to Enable/Disable Index using ALTER INDEX |
Список | pgsql-hackers |
On Tue, 22 Jul 2025 at 05:16, Sami Imseih <samimseih@gmail.com> wrote: > Also, I'd like to ask. what would be the argument against offering both options, > ALTER and a GUC to override the catalog, as currently proposed in the patch? For me, the reason I don't like ALTER TABLE + the use_invisible_index / force_invisible_index (the v18 patch seems to be confused about the name of that GUC) is because it puts into question what "invisible" means. It's going to be a pretty useless feature for use cases where a DBA wants to ensure a certain index is *never* used, but does not want to drop it. A DBA might want to disable a certain index to investigate certain forms of index corruption and it might not be good if people can just overwrite that to bypass the DBA's choice. It might be a slightly more flexible feature if there were 3 possible states and one of those states could be clearly defined to mean that users can overwrite the disabledness of all indexes by setting a GUC. I'm still struggling to like that, however. Now wondering if it would be better to spend the effort looking at pg_hint_plan and seeing how hard it would be to get global hints added which are applied to all queries, and then add a way to disable use of a named index. (I don't have any experience with that extension other than looking at the documentation) David
В списке pgsql-hackers по дате отправления: