From e98d73e8312dedc578e286ce25be883f3f84940c Mon Sep 17 00:00:00 2001 From: Shinya Kato Date: Thu, 16 Jul 2026 07:34:22 +0900 Subject: [PATCH v2] doc: Add REPACK to the list of commands allowed by MAINTAIN REPACK requires the MAINTAIN privilege, but it was missing from the lists of commands that MAINTAIN covers: the privilege description in ddl.sgml and the pg_maintain predefined role description in user-manag.sgml. This was an oversight in commit ac58465e061, which introduced REPACK. Add REPACK next to CLUSTER in both lists, and update the matching comment in aclchk.c. Author: Shinya Kato Reviewed-by: Ewan Young Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/CAOzEurRJOVokiB2J8nrF569nX-ZMb0oRSB0C=yZQ17mZxd4_BQ@mail.gmail.com --- doc/src/sgml/ddl.sgml | 3 ++- doc/src/sgml/user-manag.sgml | 1 + src/backend/catalog/aclchk.c | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index 2b08b54edf5..6838db86eca 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -2538,7 +2538,8 @@ REVOKE ALL ON accounts FROM PUBLIC; Allows VACUUM, ANALYZE, - CLUSTER, REFRESH MATERIALIZED VIEW, + CLUSTER, REPACK, + REFRESH MATERIALIZED VIEW, REINDEX, LOCK TABLE, and database object statistics manipulation functions (see ) on a relation. diff --git a/doc/src/sgml/user-manag.sgml b/doc/src/sgml/user-manag.sgml index 0ec32700bd4..d68dd261012 100644 --- a/doc/src/sgml/user-manag.sgml +++ b/doc/src/sgml/user-manag.sgml @@ -660,6 +660,7 @@ GRANT pg_signal_backend TO admin_user; VACUUM, ANALYZE, CLUSTER, + REPACK, REFRESH MATERIALIZED VIEW, REINDEX, and LOCK TABLE on all diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c index 140cd1302f5..61e70d99ff0 100644 --- a/src/backend/catalog/aclchk.c +++ b/src/backend/catalog/aclchk.c @@ -3433,8 +3433,8 @@ pg_class_aclmask_ext(Oid table_oid, Oid roleid, AclMode mask, /* * Check if ACL_MAINTAIN is being checked and, if so, and not already set * as part of the result, then check if the user is a member of the - * pg_maintain role, which allows VACUUM, ANALYZE, CLUSTER, REFRESH - * MATERIALIZED VIEW, REINDEX, and LOCK TABLE on all relations. + * pg_maintain role, which allows VACUUM, ANALYZE, CLUSTER, REPACK, + * REFRESH MATERIALIZED VIEW, REINDEX, and LOCK TABLE on all relations. */ if (mask & ACL_MAINTAIN && !(result & ACL_MAINTAIN) && -- 2.47.3