+ endterm="sql-explain-title"> command.
discusses EXPLAIN>
and other methods for understanding the behavior of an individual
query.
- The parameter <varname>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 <xref linkend="guc-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 parameters <varname>stats_command_string>,
- <varname>stats_block_level,
- and stats_row_level> control how much information is
+ The parameters <xref linkend="guc-stats-command-string">,
+ <xref linkend="guc-stats-block-level">, and
+ linkend="guc-stats-row-level"> 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
+ linkend="sql-set" endterm="sql-set-title"> command. (To prevent
+ ordinary users from hiding their activity from the administrator,
+ only superusers are allowed to change these parameters with
+ SET>.)
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).
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
+ endterm="sql-alterdatabase-title"> and
+ linkend="sql-alteruser" endterm="sql-alteruser-title">,
+ 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.
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.
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.
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
+ linkend="sql-createuser" endterm="sql-createuser-title"> or
+
+ without writing either ENCRYPTED> or
+ UNENCRYPTED>, this option determines whether the
+ password is to be encrypted. The default is on (encrypt the
+ password).
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
+ endterm="sql-vacuum-title"> and
+ endterm="sql-analyze-title"> 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.
choose a better plan. Other ways to improve the quality of the
plans chosen by the optimizer include configuring the
linkend="runtime-config-query-constants"
- endterm="runtime-config-query-constants-title">, 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
+ linkend="sql-analyze" endterm="sql-analyze-title"> more
+ frequently, increasing the value of the
+ linkend="guc-default-statistics-target"> configuration parameter,
+ and increasing the amount of statistics collected for a
+ particular column using ALTER TABLE SET
+ STATISTICS.
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.
+
+
-
+ id="guc-stats-block-level" xreflabel="guc_stats_block_level">
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.
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
+ linkend="sql-createfunction"
+ endterm="sql-createfunction-title">. Disabling validation is
+ occasionally useful to avoid problems such as forward
+ references when restoring function definitions from a dump.
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
linkend="locale"> for more information. If this variable is
set to the empty string (which is the default) then the value