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

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Jeff Davis <pgsql@j-davis.com>, Ted Yu <yuzhihong@gmail.com>, Pavel Luzanov <p.luzanov@postgrespro.ru>, Justin Pryzby <pryzby@telsasoft.com>, pgsql-hackers@postgresql.org
Date: 2023-06-13T23:54:42Z
Lists: pgsql-hackers
On Wed, Jun 14, 2023 at 08:16:15AM +0900, Michael Paquier wrote:
> While on it, this buzzes me:
>  static bool
> -vacuum_rel(Oid relid, RangeVar *relation, VacuumParams *params)
> +vacuum_rel(Oid relid, RangeVar *relation, VacuumParams *params, bool skip_privs)
> 
> VacuumParams has been originally introduced to avoid extending
> vacuum_rel() with a bunch of arguments, no?

Yeah, that could probably be moved into VacuumParams.

> So, yes, agreed about the removal of has_partition_ancestor_privs().
> I am adding an open item assigned to you and Jeff.

Thanks.  I suspect there's more discussion incoming, but I'm hoping to
close this item one way or another by 16beta2.

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



Commits

  1. Improve privilege documentation for maintenance commands.

  2. Fix cache lookup hazards introduced by ff9618e82a.

  3. Move bool parameter for vacuum_rel() to option bits.

  4. Fix MAINTAIN privileges for toast tables and partitions.

  5. Add grantable MAINTAIN privilege and pg_maintain role.