- linkend="backup-archiving-wal">. This option can only be set at
- server start or in the postgresql.conf >
- file.
+ linkend="backup-archiving-wal">.
+ This parameter can only be set in the postgresql.conf >
+ file or on the server command line .
It is important for the command to return a zero exit status if
stderr and
syslog . On Windows,
eventlog is also supported. Set this
- option to a list of desired log destinations separated by
+ parameter to a list of desired log destinations separated by
commas. The default is to log to stderr
only.
- This option can only be set at server start or in the
- postgresql.conf configuration fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
- This
option allows messages sent to
stderr> to be
+ This
parameter allows messages sent to
stderr> to be
captured and redirected into log files.
- This
option , in combination with logging to
stderr>,
+ This
method , in combination with logging to
stderr>,
is often more useful than
logging to
syslog>, since some types of messages
may not appear in
syslog> output (a common example
is dynamic-linker failure messages).
- This option can only be set at server start.
+ This parameter can only be set at server start.
- When redirect_stderr> is enabled, this option
+ When redirect_stderr> is enabled, this parameter
determines the directory in which log files will be created.
It may be specified as an absolute path, or relative to the
cluster data directory.
- This option can only be set at server start or in the
- postgresql.conf configuration fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
- When redirect_stderr is enabled, this option
+ When redirect_stderr is enabled, this parameter
sets the file names of the created log files. The value
is treated as a strftime pattern,
so % -escapes
if log_filename were server_log , then the
chosen file name would be server_log.1093827753
for a log starting at Sun Aug 29 19:02:33 2004 MST.
- This option can only be set at server start or in the
- postgresql.conf configuration fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
- When redirect_stderr is enabled, this option
+ When redirect_stderr is enabled, this parameter
determines the maximum lifetime of an individual log file.
After this many minutes have elapsed, a new log file will
be created. Set to zero to disable time-based creation of
new log files.
- This option can only be set at server start or in the
- postgresql.conf configuration fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
- When redirect_stderr is enabled, this option
+ When redirect_stderr is enabled, this parameter
determines the maximum size of an individual log file.
After this many kilobytes have been emitted into a log file,
a new log file will be created. Set to zero to disable size-based
creation of new log files.
- This option can only be set at server start or in the
- postgresql.conf configuration fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
- When redirect_stderr is enabled, this option will cause
+ When redirect_stderr is enabled, this parameter will cause
PostgreSQL to truncate (overwrite),
rather than append to, any existing log file of the same name.
However, truncation will occur only when a new file is being opened
due to time-based rotation, not during server startup or size-based
rotation. When off, pre-existing files will be appended to in
- all cases. For example, using this option in combination with
+ all cases. For example, using this setting in combination with
a log_filename like postgresql-%H.log
would result in generating twenty-four hourly log files and then
cyclically overwriting them.
- This option can only be set at server start or in the
- postgresql.conf configuration fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
Example: To keep 7 days of logs, one log file per day named
- When logging to
syslog> is enabled, this option
+ When logging to
syslog> is enabled, this parameter
facility
to be used. You may choose
from LOCAL0>, LOCAL1>,
the default is LOCAL0>. See also the
documentation of your system's
- This option can only be set at server start or in the
- postgresql.conf configuration fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
- When logging to
syslog> is enabled, this option
+ When logging to
syslog> is enabled, this parameter
determines the program name used to identify
syslog logs. The default is
postgres .
- This option can only be set at server start or in the
- postgresql.conf configuration fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
FATAL , and PANIC . For
example, if you set this to ERROR then all
SQL statements causing errors, fatal errors, or panics will be
- logged. Enabling this option can be helpful in tracking down
+ logged. Enabling this parameter can be helpful in tracking down
the source of any errors that appear in the server log.
Only superusers can change this setting.
and their durations. Minus-one (the default) disables the
feature. For example, if you set it to 250
then all SQL statements that run 250ms or longer will be
- logged. Enabling this option can be useful in tracking down
+ logged. Enabling this parameter can be useful in tracking down
unoptimized queries in your applications. This setting is
independent of log_statement and
log_duration . Only superusers can change
- Runs the server silently. If this option is set, the server
+ Runs the server silently. If this parameter is set, the server
will automatically run in background and any controlling
terminals are disassociated.
The server's standard output and standard error are redirected
to /dev/null>, so any messages sent to them will be lost.
Unless
syslog> logging is selected or
- redirect_stderr> is enabled, using this option
+ redirect_stderr> is enabled, using this parameter
is discouraged because it makes it impossible to see error messages.
+ This parameter can only be set at server start.
- These option s enable various debugging output to be emitted.
+ These parameter s enable various debugging output to be emitted.
For each executed query, they print
the resulting parse tree, the query rewriter output, or the
execution plan. debug_pretty_print indents
log_min_messages must be
DEBUG1 or lower to actually send this output
to the client or the server log, respectively.
- These option s are off by default.
+ These parameter s are off by default.
useful. Some client programs, like
psql>, attempt
to connect twice while determining if a password is required, so
duplicate connection received> messages do not
- necessarily indicate a problem. This option can only be set at
- server start or in the postgresql.conf> configuration file.
+ necessarily indicate a problem.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command line.
This outputs a line in the server log similar to
log_connections but at session termination,
and includes the duration of the session. This is off by
- default. This option can only be set at server start or in the
- postgresql.conf configuration file.
+ default.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command line.
produces its own
time stamp and process ID information, so you probably do not want to
use those escapes if you are using
syslog>.
- This option can only be set at server start or in the
- postgresql.conf configuration fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
By default, connection log messages only show the IP address of the
- connecting host. Turning on this option causes logging of the
+ connecting host. Turning on this parameter causes logging of the
host name as well. Note that depending on your host name resolution
- setup this might impose a non-negligible performance penalty. This
- option can only be set at server start or in the
- postgresql.conf fil e.
+ setup this might impose a non-negligible performance penalty.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
Query and Index Statistics Collector
+
+ These parameters control a server-wide statistics collection feature.
+ When statistics collection 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.
+
+
statistics-collection subprocess. This is on by default, but
may be turned off if you know you have no interest in
collecting statistics or running autovacuum.
- This option can only be set at server start, because the collection
+ This parameter can only be set at server start, because the collection
subprocess cannot be started or stopped on-the-fly. (However, the
extent to which statistics are actually gathered can be changed while
the server is running, so long as the subprocess exists.)
Enables the collection of statistics on the currently
executing command of each session, along with the time at
- which that command began execution. This option is off by
+ which that command began execution. This parameter is off by
default. Note that even when enabled, this information is not
visible to all users, only to superusers and the user owning
the session being reported on; so it should not represent a
- security risk. This data can be accessed via the
- pg_stat_activity system view; refer
- to for more information.
+ security risk.
+ Only superusers can change this setting.
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.
+ activity. This parameter is off by default.
+ Only superusers can change this setting.
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.
+ activity. This parameter is off by default.
+ Only superusers can change this setting.
If on, collected statistics are zeroed out whenever the server
is restarted. If off, statistics are accumulated across server
- restarts. The default is off>. This option can only
+ restarts. The default is off>. This parameter can only
be set at server start.
These settings control the behavior of the autovacuum>
- feature. Please r efer to for
+ feature. R efer to for
more information.
autovacuum daemon. This is off by default.
stats_start_collector> and stats_row_level>
must also be turned on for autovacuum to work.
- This option can only be set at server start or in the
- postgresql.conf fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
and issues VACUUM> and ANALYZE> commands
as needed for tables in that database. The delay is measured
in seconds, and the default is 60.
- This option can only be set at server start or in the
- postgresql.conf fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
Specifies the minimum number of updated or deleted tuples needed
to trigger a VACUUM> in any one table.
The default is 1000.
- This option can only be set at server start or in the
- postgresql.conf fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
This setting can be overridden for individual tables by entries in
pg_autovacuum>.
Specifies the minimum number of inserted, updated or deleted tuples
needed to trigger an ANALYZE> in any one table.
The default is 500.
- This option can only be set at server start or in the
- postgresql.conf fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
This setting can be overridden for individual tables by entries in
pg_autovacuum>.
autovacuum_vacuum_threshold
when deciding whether to trigger a VACUUM>.
The default is 0.4.
- This option can only be set at server start or in the
- postgresql.conf fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
This setting can be overridden for individual tables by entries in
pg_autovacuum>.
autovacuum_analyze_threshold
when deciding whether to trigger an ANALYZE>.
The default is 0.2.
- This option can only be set at server start or in the
- postgresql.conf fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
This setting can be overridden for individual tables by entries in
pg_autovacuum>.
VACUUM> operations. If -1 is specified (which is the
default), the regular
value will be used.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command line.
This setting can be overridden for individual tables by entries in
pg_autovacuum>.
VACUUM> operations. If -1 is specified (which is the
default), the regular
value will be used.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command line.
This setting can be overridden for individual tables by entries in
pg_autovacuum>.
desired language exist. In that case you will continue to see
the English messages.
+
+ Only superusers can change this setting, because it affects the
+ messages sent to the postmaster log as well as to the client.
+
The default, 64, has historically
proven sufficient, but you might need to raise this value if you
have clients that touch many different tables in a single
- transaction. This option can only be set at server start.
+ transaction. This parameter can only be set at server start.
return true if expr> evaluates to the null value,
and false otherwise. The correct SQL-spec-compliant behavior of
expr> = NULL is to always
- return null (unknown). Therefore this option defaults to
+ return null (unknown). Therefore this parameter defaults to
off>.
Customized Options
- This feature was designed to allow option s not normally known to
+ This feature was designed to allow parameter s not normally known to
PostgreSQL to be added by add-on modules
(such as procedural languages). This allows add-on modules to be
configured in the standard ways.
add-on module. Such variables must have names consisting of a class
name, a dot, and a variable name. custom_variable_classes>
specifies all the class names in use in a particular installation.
- This option can only be set at server start or in the
- postgresql.conf configuration fil e.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command lin e.
Developer Options
- The following option s are intended for work on the
+ The following parameter s are intended for work on the
PostgreSQL source, and in some cases
to assist with recovery of severely damaged databases. There
should be no reason to use them in a production database setup.
As such, they have been excluded from the sample
postgresql.conf> file. Note that many of these
- option s require special source compilation flags to work at all.
+ parameter s require special source compilation flags to work at all.
- Allows the modification of the structure of system tables.
+ Allows modification of the structure of system tables.
This is used by initdb .
+ This parameter can only be set at server start.
Turns on various assertion checks. This is a debugging aid. If
you are experiencing strange problems or crashes you might want
to turn this on, as it might expose programming mistakes. To use
- this option , the macro USE_ASSERT_CHECKING
+ this parameter , the macro USE_ASSERT_CHECKING
must be defined when
PostgreSQL is
built (accomplished by the configure option
--enable-cassert ). Note that
Ignore system indexes when reading system tables (but still
update the indexes when modifying the tables). This is useful
when recovering from damaged system indexes.
+ This parameter cannot be changed after session start.
server process is started, after it conducts the
authentication procedure. This is intended to give an
opportunity to attach to the server process with a debugger.
+ This parameter cannot be changed after session start.
authentication procedure. This is intended to give an
opportunity to attach to the server process with a debugger to
trace down misbehavior in authentication.
+ This parameter can only be set in the postgresql.conf>
+ file or on the server command line.
If on, emit information about resource usage during sort operations.
- This option is only available if the TRACE_SORT macro
+ This parameter is only available if the TRACE_SORT macro
was defined when
PostgreSQL was compiled.
(However, TRACE_SORT is currently defined by default.)
- If on, emit WAL-related debugging output. This option is
+ If on, emit WAL-related debugging output. This parameter is
only available if the WAL_DEBUG macro was
defined when
PostgreSQL was
compiled.