- owner, a superuser, or a role with privileges of the
- linkend="predefined-roles-table">pg_maintain
- role. If the user has MAINTAIN ,
+ lockmode .
+ If the user has MAINTAIN ,
UPDATE , DELETE , or
TRUNCATE privileges on the table, any
class="parameter">lockmode is permitted. If the user has
REFRESH MATERIALIZED VIEW completely replaces the
- contents of a materialized view. To execute this command you must be the
- owner of the materialized view, have privileges of the
- pg_maintain
- role, or have the MAINTAIN
+ contents of a materialized view. To execute this command you must have the
+ MAINTAIN
privilege on the materialized view. The old contents are discarded. If
WITH DATA is specified (or defaults) the backing query
is executed to provide the new data, and the materialized view is left in a
- Reindexing a single index or table requires being the owner of that
- index or table, having privileges of the
- pg_maintain
- role, or having the MAINTAIN privilege on the
- table. Reindexing a schema or database requires being the
+ Reindexing a single index or table requires
+ having the MAINTAIN privilege on the
+ table. Note that while REINDEX on a partitioned index or
+ table requires having the MAINTAIN privilege on the
+ partitioned table, such commands skip the privilege checks when processing
+ the individual partitions. Reindexing a schema or database requires being the
owner of that schema or database or having privileges of the
- pg_maintain role. Note specifically that it's thus
+ pg_maintain
+ role. Note specifically that it's thus
possible for non-superusers to rebuild indexes of tables owned by
- other users. However, as a special exception, when
- REINDEX DATABASE , REINDEX SCHEMA
- or REINDEX SYSTEM is issued by a non-superuser,
- indexes on shared catalogs will be skipped unless the user owns the
- catalog (which typically won't be the case), has privileges of the
- pg_maintain role, or has the MAINTAIN
- privilege on the catalog. Of course, superusers can always reindex anything.
+ other users. However, as a special exception,
+ REINDEX DATABASE , REINDEX SCHEMA ,
+ and REINDEX SYSTEM will skip indexes on shared catalogs
+ unless the user has the MAINTAIN privilege on the
+ catalog.
To vacuum a table, one must ordinarily have the MAINTAIN
- privilege on the table or be the table's owner, a superuser, or a role with
- privileges of the
- pg_maintain
- role. However, database owners are allowed to
+ privilege on the table. However, database owners are allowed to
vacuum all tables in their databases, except shared catalogs.
- (The restriction for shared catalogs means that a true database-wide
- VACUUM can only be performed by superusers and roles
- with privileges of pg_maintain .)
VACUUM will skip over any tables that the calling user
does not have permission to vacuum.
REFRESH MATERIALIZED VIEW ,
REINDEX ,
and LOCK TABLE on all
- relations.
+ relations, as if having MAINTAIN rights on those
+ objects, even without having it explicitly.
|
pg_use_reserved_connections