Provide non-superuser predefined roles for vacuum and analyze

Andrew Dunstan <andrew@dunslane.net>

Commit: 4441fc704d7048b2f1f039cc74b72bd23e7e36d0
Author: Andrew Dunstan <andrew@dunslane.net>
Date: 2022-11-28T17:08:14Z
Releases: 16.0
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

Documentation touched

Discussion