pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Provide non-superuser predefined roles for vacuum and analyze
Date: Mon, 28 Nov 2022 17:10:20 +0000
Message-ID: <E1ozhe8-001BSR-2F@gemulon.postgresql.org> (raw)

Provide non-superuser predefined roles for vacuum and analyze

This provides two new predefined roles: pg_vacuum_all_tables and
pg_analyze_all_tables. Roles which have been granted these roles can
perform vacuum or analyse respectively on any or all tables as if they
were a superuser. This removes the need to grant superuser privilege to
roles just so they can perform vacuum and/or analyze.

Nathan Bossart

Reviewed by: Bharath Rupireddy, Kyotaro Horiguchi, Stephen Frost, Robert
Haas, Mark Dilger, Tom Lane, Corey Huinker, David G. Johnston, Michael
Paquier.

Discussion: https://postgr.es/m/20220722203735.GB3996698@nathanxps13

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4441fc704d7048b2f1f039cc74b72bd23e7e36d0

Modified Files
--------------
doc/src/sgml/ref/analyze.sgml            | 10 +++++++---
doc/src/sgml/ref/vacuum.sgml             | 10 +++++++---
doc/src/sgml/user-manag.sgml             | 12 ++++++++++++
src/backend/catalog/aclchk.c             | 20 ++++++++++++++++++++
src/include/catalog/catversion.h         |  2 +-
src/include/catalog/pg_authid.dat        | 10 ++++++++++
src/test/regress/expected/privileges.out | 25 +++++++++++++++++++++++++
src/test/regress/sql/privileges.sql      | 24 ++++++++++++++++++++++++
8 files changed, 106 insertions(+), 7 deletions(-)



Message-ID: <E1ozhe8-001BSR-2F@gemulon.postgresql.org>
Permalink:  ../E1ozhe8-001BSR-2F@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ozhe8-001BSR-2F@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andrew@dunslane.net
  Subject: Re: pgsql: Provide non-superuser predefined roles for vacuum and analyze
  In-Reply-To: <E1ozhe8-001BSR-2F@gemulon.postgresql.org>
  References: <E1ozhe8-001BSR-2F@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox