Re: Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET,RESET}

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET,RESET}
Дата
Msg-id YXyVvhe4R/GjkSri@paquier.xyz
обсуждение исходный текст
Ответ на Re: Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET,RESET}  (Alexander Korotkov <aekorotkov@gmail.com>)
Ответы Re: Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET,RESET}  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Fri, Oct 29, 2021 at 11:15:08PM +0300, Alexander Korotkov wrote:
> All these cases require index rebuild to change the opclass option.  I
> can imagine there could be options, which don't require index rebuild
> to change.  For instance, a split algorithm for R-tree-like GiST index
> could be changed on the fly.  But not much point to change it on the
> existing index, though.

This point alone is enough to say that what the patch does is not
enough, then, thanks.  An index rebuild would require an exclusive
lock, but AT_SetOptions uses a share update exclusive lock.  We could
keep the same lock level by trigerring a concurrent reindex while
forbidding running this command flavor on indexes within a transaction
block, though.  I guess that this still makes the life or users a bit
easier to avoid mistakes with complicated index expressions or
predicates, but that also feels like adding code for little gain.

Another thing that could be done is to mark the index as invalid once
its set of opclass parameters is updated.  That would be simpler,
while allowing users to fire a concurrent or non-concurrent rebuild at
will after an ALTER INDEX.
--
Michael

Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Delegating superuser tasks to new security roles (Was: Granting control of SUSET gucs to non-superusers)
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Add support for ALTER INDEX .. ALTER [COLUMN] col_num {SET, RESET}