Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX
Дата
Msg-id ZJIuACTWxMFikGP8@paquier.xyz
обсуждение исходный текст
Ответ на Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Tue, Jun 20, 2023 at 11:43:05AM -0700, Jeff Davis wrote:
> The only behavior I'm worried about is REINDEX. I'm not sure what we
> should do about it, or if we even want to do something about it. If we
> want REINDEX to fail in this case, we should be sure to check
> permissions on everything up-front to avoid doing a lot of work.

Yes, that feels a bit inconsistent to only check the partitioned table
in RangeVarCallbackForReindexIndex() and let all the partitions
process as a user may not have the permissions to work on the
partitions themselves.  We'd need something close to
expand_vacuum_rel() for this work.  I am not sure that this level of
change is required, TBH, still it could be discussed for v17~.

> The
> only other option I can think of is to REINDEX only those indexes
> declared on the partitioned table (not the individual partitions),
> which seems consistent but might be confusing to users.

I am not sure to understand this last sentence.  REINDEX on a
partitioned table builds a list of the indexes to work on in the first
transaction processing the command in ReindexPartitions(), and there
is no need to process partitioned indexes as these have no storage, so
your suggestion is a no-op?
--
Michael

Вложения

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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: Improve logging when using Huge Pages