+ |
+
+
+ pg_ls_summariesdir ()
+ setof record
+
modification timestamp with time zone )
+
+ Returns the name, size, and last modification time (mtime) of each
+ ordinary file in the server's WAL summaries directory
+ (pg_wal/summaries). Filenames beginning
+ with a dot, directories, and other special files are excluded.
+
+ This function is restricted to superusers and members of
+ the pg_monitor role by default, but other users can
+ be granted EXECUTE to run the function.
+
+
+
|
REVOKE EXECUTE ON FUNCTION pg_ls_archive_statusdir() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_ls_summariesdir() FROM public;
+
REVOKE EXECUTE ON FUNCTION pg_ls_tmpdir() FROM public;
REVOKE EXECUTE ON FUNCTION pg_ls_tmpdir(oid) FROM public;
GRANT EXECUTE ON FUNCTION pg_ls_archive_statusdir() TO pg_monitor;
+GRANT EXECUTE ON FUNCTION pg_ls_summariesdir() TO pg_monitor;
+
GRANT EXECUTE ON FUNCTION pg_ls_tmpdir() TO pg_monitor;
GRANT EXECUTE ON FUNCTION pg_ls_tmpdir(oid) TO pg_monitor;
return pg_ls_dir_files(fcinfo, XLOGDIR "/archive_status", true);
}
+/*
+ * Function to return the list of files in the WAL summaries directory.
+ */
+Datum
+pg_ls_summariesdir(PG_FUNCTION_ARGS)
+{
+ return pg_ls_dir_files(fcinfo, XLOGDIR "/summaries", true);
+}
+
/*
* Function to return the list of files in the PG_LOGICAL_SNAPSHOTS_DIR
* directory.
provolatile => 'v', prorettype => 'record', proargtypes => '',
proallargtypes => '{text,int8,timestamptz}', proargmodes => '{o,o,o}',
proargnames => '{name,size,modification}', prosrc => 'pg_ls_waldir' },
+{ oid => '9220', descr => 'list of files in the pg_wal/summaries directory',
+ proname => 'pg_ls_summariesdir', procost => '10', prorows => '20',
+ proretset => 't', provolatile => 'v', prorettype => 'record',
+ proargtypes => '', proallargtypes => '{text,int8,timestamptz}',
+ proargmodes => '{o,o,o}', proargnames => '{name,size,modification}',
+ prosrc => 'pg_ls_summariesdir' },
{ oid => '5031', descr => 'list of files in the archive_status directory',
proname => 'pg_ls_archive_statusdir', procost => '10', prorows => '20',
proretset => 't', provolatile => 'v', prorettype => 'record',