From b609695b7a5c1cf7c1234143eeb35809d00ff741 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 12 Aug 2005 03:25:13 +0000 Subject: Add files to do read I/O on the cluster directory: pg_stat_file() pg_read_file() pg_ls_dir() pg_reload_conf() pg_rotate_logfile() Dave Page Andreas Pflug --- doc/src/sgml/func.sgml | 130 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 125 insertions(+), 5 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 7dc9a3b5978..177717ff88b 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,5 +1,5 @@ @@ -9061,6 +9061,9 @@ SELECT set_config('log_statement_stats', 'off', false); pg_cancel_backend + + pg_reload_conf + signal @@ -9068,7 +9071,7 @@ SELECT set_config('log_statement_stats', 'off', false); - The function shown in sends control signals to other server processes. Use of this function is restricted to superusers. @@ -9090,26 +9093,36 @@ SELECT set_config('log_statement_stats', 'off', false); int Cancel a backend's current query + + + pg_reload_conf() + + int + Causes server processes to reload their configuration files + - This function returns 1 if successful, 0 if not successful. + These functions return 1 if successful, 0 if not successful. The process ID (pid) of an active backend can be found from the procpid column in the pg_stat_activity view, or by listing the postgres processes on the server with ps. + + pg_reload_conf sends a SIGHUP signal to the + postmaster, causing the reload of the configuration files + in all backend processes. + pg_start_backup - pg_stop_backup - backup @@ -9309,6 +9322,113 @@ SELECT set_config('log_statement_stats', 'off', false); appropriate. + + The functions shown in provide native file access to + files on the machine hosting the server. Only files relative to + the cluster directory are allowed, and the logfile directory, + because the logfile directory might be stored outside the + cluster directory. Use of these functions is restricted to + superusers. + + + + Generic File Access Functions + + + Name Return Type Description + + + + + + + pg_file_length(filename_text) + + pg_file_length + + + int8 + Returns the file length + + + + pg_ls_dir(dirname_text,fullpath_bool) + + pg_ls_dir + + + setof text + List the contents of a directory + + + + pg_read_file(filename_text, + offset_int8,length_int8) + + text + Returns the contents of a text file + + + + pg_stat_file(filename_text) + + record + Returns information about the file + + + +
+ + + pg_read_file + + + pg_read_file() returns part of a textfile, starting + at the given offset, returning length bytes. If offset is negative, + it is treated relative to the end of the file. + + + + pg_stat_file + + + pg_stat_file() returns a record containing the + length, last accessed timestamp, last modified timestamp, + creation timestamp, and a flag indicating if it is a directory. + + + + The function shown in forces the server + logfile to be rotated if redirect_stderr + is used for logging. Use of this functions is restricted + to superusers. + + + + Backend Logfile Functions + + + Name Return Type Description + + + + + + + pg_rotate_logfile() + + pg_rotate_logfile + + + int + Rotate logfile + + + +
+ -- cgit v1.2.3