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

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX
Дата
Msg-id 20230620174927.GA494037@nathanxps13
обсуждение исходный текст
Ответ на Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On Tue, Jun 20, 2023 at 10:40:32AM -0700, Nathan Bossart wrote:
> On Tue, Jun 20, 2023 at 10:04:37AM -0700, Jeff Davis wrote:
>> I think v4-0001 broke the handling of toast tables? It looks like you
>> removed the check for !skip_privs but need to add it to the flags in
>> vacuum_is_permitted_for_relation(). 
> 
> Good catch.  I'm not sure why some of the calls to
> vacuum_is_permitted_for_relation() are masking the options.  AFAICT we can
> simply remove the masks.  I've done so in the attached patch.

Oh, I think I see why.  This appears to be used to control which WARNING
message is emitted.  If you lose permissions before you get to analyzing in
a VACUUM (ANALYZE) command, you'll get a "permission denied to vacuum"
message instead of a "permission denied to analyze" message.  IMO a better
way to do that would be to control only those two bits (VACOPT_VACUUM and
VACOPT_ANALYZE) in calls to vacuum_is_permitted_for_relation(), and to
leave the rest untouched.

Patch incoming...

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: remap the .text segment into huge pages at run time
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX