- publishing free software manuals
PostgreSQL Reference Manual - Volume 3 - Server Administration Guide
by The PostgreSQL Global Development Group
Paperback (6"x9"), 204 pages
ISBN 0954612043
RRP £13.95 ($24.95)

Sales of this book support the PostgreSQL project! Get a printed copy>>>

4.8.1 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 section 12 Monitoring Database Activity for more information.

Note: As of PostgreSQL 8.2, stats_command_string controls a separate data collection mechanism that can be turned on or off independently of whether the statistics-collection subprocess is running. The subprocess is only needed to support collection of block-level or row-level statistics.

stats_command_string (boolean)
Enables the collection of information on the currently executing command of each session, along with the time at which that command began execution. This parameter is on 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. Only superusers can change this setting.
update_process_title (boolean)
Enables updating of the process title every time a new SQL command is received by the server. The process title is typically viewed by the ps command or in Windows using the Process Explorer. Only superusers can change this setting.
stats_start_collector (boolean)
Controls whether the server should start the 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 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.)
stats_block_level (boolean)
Enables the collection of block-level statistics on database activity. This parameter is off by default. Only superusers can change this setting.
stats_row_level (boolean)
Enables the collection of row-level statistics on database activity. This parameter is off by default. Only superusers can change this setting.
stats_reset_on_server_start (boolean)
If on, collected block-level and row-level statistics are zeroed out whenever the server is restarted. If off, statistics are accumulated across server restarts. This parameter is off by default. This parameter can only be set at server start.
ISBN 0954612043PostgreSQL Reference Manual - Volume 3 - Server Administration GuideSee the print edition