From a43ea120bf7539232d9f41a3bf7f7986fde84837 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 12 Aug 2005 18:23:56 +0000 Subject: Code & docs review for server instrumentation patch. File timestamps should surely be timestamptz not timestamp; fix some but not all of the holes in check_and_make_absolute(); other minor cleanup. Also put in the missed catversion bump. --- doc/src/sgml/func.sgml | 83 +++++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 38 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 79c246fc2cf..7790615d24a 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,5 +1,5 @@ @@ -9072,13 +9072,13 @@ SELECT set_config('log_statement_stats', 'off', false); The functions shown in sends control signals to - other server processes. Use of this function is restricted + linkend="functions-admin-signal-table"> send control signals to + other server processes. Use of these functions is restricted to superusers. - Backend Signalling Functions + Server Signalling Functions Name Return Type Description @@ -9088,7 +9088,7 @@ SELECT set_config('log_statement_stats', 'off', false); - pg_cancel_backend(pid) + pg_cancel_backend(pid int) int Cancel a backend's current query @@ -9098,7 +9098,7 @@ SELECT set_config('log_statement_stats', 'off', false); pg_reload_conf() int - Causes server processes to reload their configuration files + Cause server processes to reload their configuration files @@ -9113,8 +9113,8 @@ SELECT set_config('log_statement_stats', 'off', false); pg_reload_conf sends a SIGHUP signal to the - postmaster, causing the reload of the configuration files - in all backend processes. + postmaster, causing reload of the configuration files + in all server processes. @@ -9144,7 +9144,7 @@ SELECT set_config('log_statement_stats', 'off', false); - pg_start_backup(label_text) + pg_start_backup(label text) text Set up for performing on-line backup @@ -9219,48 +9219,48 @@ SELECT set_config('log_statement_stats', 'off', false); - pg_column_size(any) + pg_column_size(any) integer Number of bytes used to store a particular value (possibly compressed) - pg_tablespace_size(oid) + pg_tablespace_size(oid) bigint Total disk space used by the tablespace with the specified OID - pg_tablespace_size(name) + pg_tablespace_size(name) bigint Total disk space used by the tablespace with the specified name - pg_database_size(oid) + pg_database_size(oid) bigint Total disk space used by the database with the specified OID - pg_database_size(name) + pg_database_size(name) bigint Total disk space used by the database with the specified name - pg_relation_size(oid) + pg_relation_size(oid) bigint Disk space used by the table or index with the specified OID - pg_relation_size(text) + pg_relation_size(text) bigint Disk space used by the table or index with the specified name. @@ -9268,7 +9268,7 @@ SELECT set_config('log_statement_stats', 'off', false); - pg_complete_relation_size(oid) + pg_complete_relation_size(oid) bigint Total disk space used by the table with the specified OID, @@ -9276,7 +9276,7 @@ SELECT set_config('log_statement_stats', 'off', false); - pg_complete_relation_size(text) + pg_complete_relation_size(text) bigint Total disk space used by the table with the specified name, @@ -9285,7 +9285,7 @@ SELECT set_config('log_statement_stats', 'off', false); - pg_size_pretty(bigint) + pg_size_pretty(bigint) text Converts a size in bytes into a human-readable format with size units @@ -9325,11 +9325,11 @@ SELECT set_config('log_statement_stats', 'off', false); 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 log_directory, - because the log file directory might be stored outside the - cluster directory. Use of these functions is restricted to - superusers. + files on the machine hosting the server. Only files within the + database cluster directory and the log_directory may be + accessed. Use a relative path for files within the cluster directory, + and a path matching the log_directory configuration setting + for log files. Use of these functions is restricted to superusers.
@@ -9343,17 +9343,17 @@ SELECT set_config('log_statement_stats', 'off', false); - pg_file_length(filename_text) + pg_file_length(filename text) pg_file_length int8 - Returns the file length + Return the file length - pg_ls_dir(dirname_text,fullpath_bool) + pg_ls_dir(dirname text) pg_ls_dir @@ -9363,18 +9363,17 @@ SELECT set_config('log_statement_stats', 'off', false); - pg_read_file(filename_text, - offset_int8,length_int8) + pg_read_file(filename text, offset int8, length int8) text - Returns the contents of a text file + Return the contents of a text file - pg_stat_file(filename_text) + pg_stat_file(filename text) record - Returns information about the file + Return information about the file @@ -9385,8 +9384,9 @@ SELECT set_config('log_statement_stats', 'off', false); 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. + at the given offset, returning at most length bytes (less if the + end of file is reached first). If offset is negative, + it is relative to the end of the file. @@ -9396,18 +9396,25 @@ SELECT set_config('log_statement_stats', 'off', false); 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. + Use it like this: + +SELECT * +FROM pg_stat_file('filename') + AS s(length int8, atime timestamptz, mtime timestamptz, + ctime timestamptz, isdir bool); + The function shown in forces the server - logfile to be rotated if redirect_stderr - is used for logging. Use of this functions is restricted + logfile to be rotated. This works only when redirect_stderr + is used for logging. Use of this function is restricted to superusers.
- Backend Logfile Functions + Server Logfile Functions Name Return Type Description @@ -9423,7 +9430,7 @@ SELECT set_config('log_statement_stats', 'off', false); int - Rotate logfile + Rotate server's logfile -- cgit v1.2.3