mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Improve privilege documentation for maintenance commands.
The documentation of the required privileges for maintenance commands (i.e., VACUUM, ANALYZE, CLUSTER, LOCK TABLE, REFRESH MATERIALIZED VIEW, and REINDEX) is redundant, inaccurate, and difficult to read. This commit fixes and simplifies this documentation by removing references to ownership, superuser, and the pg_maintain role. In addition, this removes notes about database-wide VACUUM and ANALYZE, clarifies matters for REINDEX on partitioned indexes and tables, and strengthens the description of the pg_maintain role. Reviewed-by: Michael Paquier, Jeff Davis Discussion: https://postgr.es/m/20230615041044.GA736001%40nathanxps13
This commit is contained in:
@@ -183,14 +183,8 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea
|
||||
|
||||
<para>
|
||||
To analyze a table, one must ordinarily have the <literal>MAINTAIN</literal>
|
||||
privilege on the table or be the table's owner, a superuser, or a role with
|
||||
privileges of the
|
||||
<link linkend="predefined-roles-table"><literal>pg_maintain</literal></link>
|
||||
role. However, database owners are allowed to
|
||||
privilege on the table. However, database owners are allowed to
|
||||
analyze all tables in their databases, except shared catalogs.
|
||||
(The restriction for shared catalogs means that a true database-wide
|
||||
<command>ANALYZE</command> can only be performed by superusers and roles
|
||||
with privileges of <literal>pg_maintain</literal>.)
|
||||
<command>ANALYZE</command> will skip over any tables that the calling user
|
||||
does not have permission to analyze.
|
||||
</para>
|
||||
|
Reference in New Issue
Block a user