From 1090aa8cc717c5614341289076a3b5ffc2ece23e Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Fri, 26 Mar 2004 03:18:28 +0000 Subject: [PATCH] More cross-reference work, other minor SGML fixes and improvements. --- doc/src/sgml/monitoring.sgml | 43 ++++++------ doc/src/sgml/plpgsql.sgml | 5 +- doc/src/sgml/runtime.sgml | 123 +++++++++++++++++++++++------------ 3 files changed, 107 insertions(+), 64 deletions(-) diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 3d120409b1..4486745c76 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -1,5 +1,5 @@ @@ -28,7 +28,8 @@ $PostgreSQL: pgsql/doc/src/sgml/monitoring.sgml,v 1.25 2003/11/29 19:51:37 pgsql but one should not neglect regular Unix monitoring programs such as ps and top. Also, once one has identified a poorly-performing query, further investigation may be needed using - PostgreSQL's EXPLAIN command. + PostgreSQL's command. discusses EXPLAIN and other methods for understanding the behavior of an individual query. @@ -126,28 +127,30 @@ postgres: user database host - The parameter stats_start_collector must be set to - true for the statistics collector to - be launched at all. This is the default and recommended setting, - but it may be turned off if you have no interest in statistics and - want to squeeze out every last drop of overhead. (The savings is - likely to be small, however.) Note that this option - cannot be changed while the server is running. + The parameter must be + set to true for the statistics collector to be launched + at all. This is the default and recommended setting, but it may be + turned off if you have no interest in statistics and want to + squeeze out every last drop of overhead. (The savings is likely to + be small, however.) Note that this option cannot be changed while + the server is running. - The parameters stats_command_string, - stats_block_level, - and stats_row_level control how much information is + The parameters , + , and control how much information is actually sent to the collector and thus determine how much run-time - overhead occurs. These respectively determine whether a server process - sends its current command string, disk-block-level access statistics, and - row-level access statistics to the collector. Normally these parameters are - set in postgresql.conf so that they apply to all server - processes, but it is possible to turn them on or off in individual sessions - using the SET command. (To prevent ordinary users - from hiding their activity from the administrator, only superusers are - allowed to change these parameters with SET.) + overhead occurs. These respectively determine whether a server + process sends its current command string, disk-block-level access + statistics, and row-level access statistics to the collector. + Normally these parameters are set in postgresql.conf + so that they apply to all server processes, but it is possible to + turn them on or off in individual sessions using the command. (To prevent + ordinary users from hiding their activity from the administrator, + only superusers are allowed to change these parameters with + SET.) diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index c84967f326..af521f3072 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -1,5 +1,5 @@ @@ -128,7 +128,8 @@ END; The PL/pgSQL EXECUTE statement is not related to the - EXECUTE statement supported by the + SQL + statement supported by the PostgreSQL server. The server's EXECUTE statement cannot be used within PL/pgSQL functions (and is not needed). diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 93902043e3..73bd7fd835 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1,5 +1,5 @@ @@ -521,12 +521,14 @@ env PGOPTIONS='-c geqo=off' psql Furthermore, it is possible to assign a set of option settings to a user or a database. Whenever a session is started, the default settings for the user and database involved are loaded. The - commands ALTER DATABASE and ALTER - USER, respectively, are used to configure these - settings. Per-database settings override anything received - from the postmaster command-line or the - configuration file, and in turn are overridden by per-user - settings; both are overridden by per-session options. + commands and , + respectively, are used to configure these settings. Per-database + settings override anything received from the + postmaster command-line or the configuration + file, and in turn are overridden by per-user settings; both are + overridden by per-session options. @@ -652,7 +654,7 @@ SET ENABLE_SEQSCAN TO OFF; server is to listen for connections from client applications. The default is normally /tmp, but can be changed at build time. - This parameter can only be set at server start. + This parameter can only be set at server start. @@ -711,10 +713,11 @@ SET ENABLE_SEQSCAN TO OFF; rendezvous_name (string) - Specifies the Rendezvous broadcast name. By default, the - computer name is used, specified as an empty string ''. - This option is only meaningful on platforms that support Rendezvous. - This option can only be set at server start. + Specifies the Rendezvous broadcast + name. By default, the computer name is used, specified as an + empty string ''. This option is only meaningful on platforms + that support Rendezvous. This + option can only be set at server start. @@ -759,10 +762,13 @@ SET ENABLE_SEQSCAN TO OFF; password_encryption (boolean) - When a password is specified in CREATE USER or - ALTER USER without writing either ENCRYPTED or - UNENCRYPTED, this option determines whether the password is to be - encrypted. The default is on (encrypt the password). + When a password is specified in or + + without writing either ENCRYPTED or + UNENCRYPTED, this option determines whether the + password is to be encrypted. The default is on (encrypt the + password). @@ -1010,13 +1016,14 @@ SET ENABLE_SEQSCAN TO OFF; Cost-Based Vacuum Delay - During the execution of VACUUM - and ANALYZE commands, - the system maintains an internal counter that keeps track of the - estimated cost of the various I/O operations that are performed. - When the accumulated cost reaches a limit - (specified by vacuum_cost_limit), the process - performing the operation will sleep for a while (specified by + During the execution of and commands, the system maintains an + internal counter that keeps track of the estimated cost of the + various I/O operations that are performed. When the accumulated + cost reaches a limit (specified by + vacuum_cost_limit), the process performing + the operation will sleep for a while (specified by vacuum_cost_naptime). Then it will reset the counter and continue execution. @@ -1306,10 +1313,13 @@ SET ENABLE_SEQSCAN TO OFF; choose a better plan. Other ways to improve the quality of the plans chosen by the optimizer include configuring the , running - ANALYZE more frequently, and increasing the - amount of statistics collected for a particular column using - ALTER TABLE SET STATISTICS. + endterm="runtime-config-query-constants-title">, running more + frequently, increasing the value of the configuration parameter, + and increasing the amount of statistics collected for a + particular column using ALTER TABLE SET + STATISTICS. @@ -2115,13 +2125,27 @@ SET ENABLE_SEQSCAN TO OFF; log_statement (boolean) - Causes each SQL statement to be logged. The default is off. - EXECUTE only displays the plan name, not the - prepared query. Server-side languages like - PL/pgSQL that store functions in a cache only - display their queries on first function call. Only superusers can - turn off this option if it is enabled by the administrator. + Causes each SQL statement to be logged. The default is + off. Only superusers can disable this option if it has been + enabled by an administrator. + + + + When the EXECUTE statement is logged, only + the name of the prepared statement is recorded, not the + entire prepared statement. + + + + When a function is defined in a server-side language like + PL/pgSQL, any queries executed by + the function will only be logged the first time that the + function is invoked in a particular session. This is because + the PL/pgSQL keeps a cache of the + query plans produced for the SQL statements in the function. + + @@ -2202,14 +2226,27 @@ SET ENABLE_SEQSCAN TO OFF; - + stats_block_level (boolean) + + + Enables the collection of block-level statistics on database + activity. This option is disabled by default. If this option + is enabled, the data that is produced can be accessed via the + pg_stat and + pg_statio family of system views; + refer to for more information. + + + + + stats_row_level (boolean) - These enable the collection of block-level and row-level statistics - on database activity, respectively. These options are off by - default. This data can be accessed via the + Enables the collection of row-level statistics on database + activity. This option is disabled by default. If this option + is enabled, the data that is produced can be accessed via the pg_stat and pg_statio family of system views; refer to for more information. @@ -2311,10 +2348,12 @@ SET ENABLE_SEQSCAN TO OFF; check_function_bodies (boolean) - This parameter is normally true. When set false, it disables - validation of the function body string in CREATE FUNCTION. - Disabling validation is occasionally useful to avoid problems such as - forward references when restoring function definitions from a dump. + This parameter is normally true. When set to false, it disables + validation of the function body string in . Disabling validation is + occasionally useful to avoid problems such as forward + references when restoring function definitions from a dump. @@ -2503,7 +2542,7 @@ SET ENABLE_SEQSCAN TO OFF; Sets the locale to use for formatting numbers, for example - with the to_char() family of + with the to_char family of functions. Acceptable values are system-dependent; see for more information. If this variable is set to the empty string (which is the default) then the value