Skip to content

Commit e94cd0a

Browse files
committed
Doc: document permissions required for ANALYZE.
VACUUM's reference page had this text, but ANALYZE's didn't. That's a clear oversight given that section 5.7 explicitly delegates the responsibility to define permissions requirements to the individual commands' man pages. Per gripe from Isaac Morland. Back-patch to all supported branches. Discussion: https://postgr.es/m/CAMsGm5fp3oBUs-2iRfii0iEO=fZuJALVyM2zJLhNTjG34gpAVQ@mail.gmail.com
1 parent e1f4c48 commit e94cd0a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/src/sgml/ref/analyze.sgml

+10
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea
147147
<refsect1>
148148
<title>Notes</title>
149149

150+
<para>
151+
To analyze a table, one must ordinarily be the table's owner or a
152+
superuser. However, database owners are allowed to
153+
analyze all tables in their databases, except shared catalogs.
154+
(The restriction for shared catalogs means that a true database-wide
155+
<command>ANALYZE</command> can only be performed by a superuser.)
156+
<command>ANALYZE</command> will skip over any tables that the calling user
157+
does not have permission to analyze.
158+
</para>
159+
150160
<para>
151161
Foreign tables are analyzed only when explicitly selected. Not all
152162
foreign data wrappers support <command>ANALYZE</command>. If the table's

0 commit comments

Comments
 (0)