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:
@ -689,6 +689,15 @@ pg_ls_archive_statusdir(PG_FUNCTION_ARGS)
|
||||
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.
|
||||
|
Reference in New Issue
Block a user