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 per-table permissions for vacuum and analyze.
Date: Mon, 28 Nov 2022 17:10:20 +0000
Message-ID: <E1ozhe8-001BSQ-17@gemulon.postgresql.org> (raw)

Provide per-table permissions for vacuum and analyze.

Currently a table can only be vacuumed or analyzed by its owner or
a superuser. This can now be extended to any user by means of an
appropriate GRANT.

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/b5d6382496f2b8fc31abd92c2654a9a67aca76c6

Modified Files
--------------
doc/src/sgml/ddl.sgml                          | 49 ++++++++++++---
doc/src/sgml/func.sgml                         |  3 +-
doc/src/sgml/ref/alter_default_privileges.sgml |  4 +-
doc/src/sgml/ref/analyze.sgml                  |  3 +-
doc/src/sgml/ref/grant.sgml                    |  4 +-
doc/src/sgml/ref/revoke.sgml                   |  2 +-
doc/src/sgml/ref/vacuum.sgml                   |  3 +-
src/backend/catalog/aclchk.c                   |  8 +++
src/backend/commands/analyze.c                 | 13 ++--
src/backend/commands/vacuum.c                  | 62 ++++++++++---------
src/backend/parser/gram.y                      |  7 +++
src/backend/utils/adt/acl.c                    | 16 +++++
src/bin/pg_dump/dumputils.c                    |  2 +
src/bin/pg_dump/t/002_pg_dump.pl               |  2 +-
src/bin/psql/tab-complete.c                    |  5 +-
src/include/commands/vacuum.h                  |  4 +-
src/include/nodes/parsenodes.h                 |  4 +-
src/include/utils/acl.h                        |  6 +-
src/test/regress/expected/dependency.out       | 22 +++----
src/test/regress/expected/privileges.out       | 86 +++++++++++++++++++-------
src/test/regress/expected/rowsecurity.out      | 34 +++++-----
src/test/regress/expected/vacuum.out           |  6 ++
src/test/regress/sql/dependency.sql            |  2 +-
src/test/regress/sql/privileges.sql            | 40 ++++++++++++
24 files changed, 274 insertions(+), 113 deletions(-)



Message-ID: <E1ozhe8-001BSQ-17@gemulon.postgresql.org>
Permalink:  ../E1ozhe8-001BSQ-17@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ozhe8-001BSQ-17@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 per-table permissions for vacuum and analyze.
  In-Reply-To: <E1ozhe8-001BSQ-17@gemulon.postgresql.org>
  References: <E1ozhe8-001BSQ-17@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