summaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/vacuum.sgml
diff options
context:
space:
mode:
authorJeff Davis2023-01-13 23:32:37 +0000
committerJeff Davis2023-01-14 08:16:23 +0000
commitff9618e82a466fc9c635f9f087776e57b21e4f14 (patch)
tree667ee5aece95c24ff098be9e39f67aa9df461d2d /doc/src/sgml/ref/vacuum.sgml
parentff23b592ad6621563d3128b26860bcb41daf9542 (diff)
Fix MAINTAIN privileges for toast tables and partitions.
Commit 60684dd8 left loose ends when it came to maintaining toast tables or partitions. For toast tables, simply skip the privilege check if the toast table is an indirect target of the maintenance command, because the main table privileges have already been checked. For partitions, allow the maintenance command if the user has the MAINTAIN privilege on the partition or any parent. Also make CLUSTER emit "skipping" messages when the user doesn't have privileges, similar to VACUUM. Author: Nathan Bossart Reported-by: Pavel Luzanov Reviewed-by: Pavel Luzanov, Ted Yu Discussion: https://postgr.es/m/20230113231339.GA2422750@nathanxps13
Diffstat (limited to 'doc/src/sgml/ref/vacuum.sgml')
-rw-r--r--doc/src/sgml/ref/vacuum.sgml5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/vacuum.sgml b/doc/src/sgml/ref/vacuum.sgml
index 8fa84218471..545b23b54f6 100644
--- a/doc/src/sgml/ref/vacuum.sgml
+++ b/doc/src/sgml/ref/vacuum.sgml
@@ -401,7 +401,10 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ <replaceable class="paramet
vacuum all tables in their databases, except shared catalogs.
(The restriction for shared catalogs means that a true database-wide
<command>VACUUM</command> can only be performed by superusers and roles
- with privileges of <literal>pg_maintain</literal>.)
+ with privileges of <literal>pg_maintain</literal>.) If a role has
+ permission to <command>VACUUM</command> a partitioned table, it is also
+ permitted to <command>VACUUM</command> each of its partitions, regardless
+ of whether the role has the aforementioned privileges on the partition.
<command>VACUUM</command> will skip over any tables that the calling user
does not have permission to vacuum.
</para>