mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Add pg_ls_summariesdir().
This function returns the name, size, and last modification time of each regular file in pg_wal/summaries. This allows administrators to grant privileges to view the contents of this directory without granting privileges on pg_ls_dir(), which allows listing the contents of many other directories. This commit also gives the pg_monitor predefined role EXECUTE privileges on the new pg_ls_summariesdir() function. Bumps catversion. Author: Yushi Ogiwara Reviewed-by: Michael Paquier, Fujii Masao Discussion: https://postgr.es/m/a0a3af15a9b9daa107739eb45aa9a9bc%40oss.nttdata.com
This commit is contained in:
@ -30530,6 +30530,30 @@ SELECT pg_size_pretty(sum(pg_relation_size(relid))) AS total_size
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="func_table_entry"><para role="func_signature">
|
||||
<indexterm>
|
||||
<primary>pg_ls_summariesdir</primary>
|
||||
</indexterm>
|
||||
<function>pg_ls_summariesdir</function> ()
|
||||
<returnvalue>setof record</returnvalue>
|
||||
( <parameter>name</parameter> <type>text</type>,
|
||||
<parameter>size</parameter> <type>bigint</type>,
|
||||
<parameter>modification</parameter> <type>timestamp with time zone</type> )
|
||||
</para>
|
||||
<para>
|
||||
Returns the name, size, and last modification time (mtime) of each
|
||||
ordinary file in the server's WAL summaries directory
|
||||
(<filename>pg_wal/summaries</filename>). Filenames beginning
|
||||
with a dot, directories, and other special files are excluded.
|
||||
</para>
|
||||
<para>
|
||||
This function is restricted to superusers and members of
|
||||
the <literal>pg_monitor</literal> role by default, but other users can
|
||||
be granted EXECUTE to run the function.
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="func_table_entry"><para role="func_signature">
|
||||
<indexterm>
|
||||
|
Reference in New Issue
Block a user