diff options
author | Stephen Frost | 2016-09-30 02:13:38 +0000 |
---|---|---|
committer | Stephen Frost | 2016-09-30 02:13:38 +0000 |
commit | fd321a1dfd64d30bf1652ea6b39b654304f68ae4 (patch) | |
tree | df9133b53b185a4c21d6848035bdf86077268da9 /doc | |
parent | f2af8dc5ba8801c126d877a52076d441cac78646 (diff) |
Remove superuser checks in pgstattuple
Now that we track initial privileges on extension objects and changes to
those permissions, we can drop the superuser() checks from the various
functions which are part of the pgstattuple extension and rely on the
GRANT system to control access to those functions.
Since a pg_upgrade will preserve the version of the extension which
existed prior to the upgrade, we can't simply modify the existing
functions but instead need to create new functions which remove the
checks and update the SQL-level functions to use the new functions
(and to REVOKE EXECUTE rights on those functions from PUBLIC).
Thanks to Tom and Andres for adding support for extensions to follow
update paths (see: 40b449a), allowing this patch to be much smaller
since no new base version script needed to be included.
Approach suggested by Noah.
Reviewed by Michael Paquier.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/sgml/pgstattuple.sgml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/src/sgml/pgstattuple.sgml b/doc/src/sgml/pgstattuple.sgml index 61340bedbc3..9ada5d209af 100644 --- a/doc/src/sgml/pgstattuple.sgml +++ b/doc/src/sgml/pgstattuple.sgml @@ -12,6 +12,14 @@ obtain tuple-level statistics. </para> + <para> + As these functions return detailed page-level information, only the superuser + has EXECUTE privileges on them upon installation. After the functions have + been installed, users may issue <command>GRANT</command> commands to change + the privileges on the functions to allow non-superusers to execute them. See + the description of the <xref linkend="sql-grant"> command for specifics. + </para> + <sect2> <title>Functions</title> |