aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/func.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/func.sgml')
-rw-r--r--doc/src/sgml/func.sgml45
1 files changed, 43 insertions, 2 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index a521912317b..9518fa20388 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -19646,7 +19646,8 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
database cluster directory and the <varname>log_directory</> can be
accessed. Use a relative path for files in the cluster directory,
and a path matching the <varname>log_directory</> configuration setting
- for log files. Use of these functions is restricted to superusers.
+ for log files. Use of these functions is restricted to superusers
+ except where stated otherwise.
</para>
<table id="functions-admin-genfile-table">
@@ -19669,6 +19670,26 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
+ <literal><function>pg_ls_logdir()</function></literal>
+ </entry>
+ <entry><type>setof record</type></entry>
+ <entry>
+ List the name, size, and last modification time of files in the log
+ directory. Access may be granted to non-superuser roles.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_ls_waldir()</function></literal>
+ </entry>
+ <entry><type>setof record</type></entry>
+ <entry>
+ List the name, size, and last modification time of files in the WAL
+ directory. Access may be granted to non-superuser roles.
+ </entry>
+ </row>
+ <row>
+ <entry>
<literal><function>pg_read_file(<parameter>filename</> <type>text</> [, <parameter>offset</> <type>bigint</>, <parameter>length</> <type>bigint</> [, <parameter>missing_ok</> <type>boolean</>] ])</function></literal>
</entry>
<entry><type>text</type></entry>
@@ -19699,7 +19720,7 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
</table>
<para>
- All of these functions take an optional <parameter>missing_ok</> parameter,
+ Some of these functions take an optional <parameter>missing_ok</> parameter,
which specifies the behavior when the file or directory does not exist.
If <literal>true</literal>, the function returns NULL (except
<function>pg_ls_dir</>, which returns an empty result set). If
@@ -19720,6 +19741,26 @@ postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
</para>
<indexterm>
+ <primary>pg_ls_logdir</primary>
+ </indexterm>
+ <para>
+ <function>pg_ls_logdir</> returns the name, size, and last modified time
+ (mtime) of each file in the log directory. By default, only superusers
+ can use this function, but access may be granted to others using
+ <command>GRANT</command>.
+ </para>
+
+ <indexterm>
+ <primary>pg_ls_waldir</primary>
+ </indexterm>
+ <para>
+ <function>pg_ls_waldir</> returns the name, size, and last modified time
+ (mtime) of each file in the write ahead log (WAL) directory. By
+ default only superusers can use this function, but access may be granted
+ to others using <command>GRANT</command>.
+ </para>
+
+ <indexterm>
<primary>pg_read_file</primary>
</indexterm>
<para>