Provide non-superuser predefined roles for vacuum and analyze
Andrew Dunstan <andrew@dunslane.net>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/analyze.sgml | modified | +7 −3 |
| doc/src/sgml/ref/vacuum.sgml | modified | +7 −3 |
| doc/src/sgml/user-manag.sgml | modified | +12 −0 |
| src/backend/catalog/aclchk.c | modified | +20 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_authid.dat | modified | +10 −0 |
| src/test/regress/expected/privileges.out | modified | +25 −0 |
| src/test/regress/sql/privileges.sql | modified | +24 −0 |
Documentation touched
Discussion
- predefined role(s) for VACUUM and ANALYZE 63 messages · 2022-07-22 → 2022-12-06