Re: Proposal to Enable/Disable Index using ALTER INDEX

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Proposal to Enable/Disable Index using ALTER INDEX
Дата
Msg-id CA+TgmoZweRq4A9xBY-+n1OPDt76Vf2h3sVvLdbZNuzp68S+m4w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal to Enable/Disable Index using ALTER INDEX  (Peter Eisentraut <peter@eisentraut.org>)
Список pgsql-hackers
On Wed, Oct 16, 2024 at 8:33 AM Peter Eisentraut <peter@eisentraut.org> wrote:
> > Yeah, I'd be inclined to implement this by having create_index_paths
> > just not make any paths for rejected indexes.  Or you could back up
> > another step and keep plancat.c from building IndexOptInfos for them.
> > The latter might have additional effects, such as preventing the plan
> > from relying on a uniqueness condition enforced by the index.  Not
> > clear to me if that's desirable or not.
>
> Yes, I think you'd want that, because one of the purposes of this
> feature would be to test whether it's okay to drop an index.  So you
> don't want the planner to take any account of the index for its decisions.

I think this is right. I think we want to avoid invalidating the
index, so we still need to consider it in determining where HOT
updates must be performed, but we don't want to "improve" the plan
using the index if it's disabled.

--
Robert Haas
EDB: http://www.enterprisedb.com



В списке pgsql-hackers по дате отправления: