Simplify and rename some GUC variables, per various recent discussions:
authorTom Lane
Mon, 24 Sep 2007 03:12:23 +0000 (03:12 +0000)
committerTom Lane
Mon, 24 Sep 2007 03:12:23 +0000 (03:12 +0000)
* stats_start_collector goes away; we always start the collector process,
unless prevented by a problem with setting up the stats UDP socket.

* stats_reset_on_server_start goes away; it seems useless in view of the
availability of pg_stat_reset().

* stats_block_level and stats_row_level are merged into a single variable
"track_counts", which controls all reports sent to the collector process.

* stats_command_string is renamed to track_activities.

* log_autovacuum is renamed to log_autovacuum_min_duration to better reflect
its meaning.

The log_autovacuum change is not a compatibility issue since it didn't exist
before 8.3 anyway.  The other changes need to be release-noted.

14 files changed:
doc/src/sgml/config.sgml
doc/src/sgml/maintenance.sgml
doc/src/sgml/monitoring.sgml
doc/src/sgml/release.sgml
src/backend/commands/analyze.c
src/backend/commands/vacuumlazy.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/pgstat.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/pgstat.h
src/include/postmaster/autovacuum.h
src/test/regress/expected/stats.out
src/test/regress/sql/stats.sql

index f275efb1c3b0aa1aa99aab5907f229b1c560dc3e..fd2fd5d71bfffd9e505e410861b7748b06037fbb 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
   Server Configuration
@@ -3186,30 +3186,19 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
      Query and Index Statistics Collector
 
      
-      These parameters control a server-wide statistics collection feature.
+      These parameters control server-wide statistics collection features.
       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.
      
 
-     
-     
-      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" xreflabel="stats_command_string">
-      stats_command_string (boolean)
+     track-activities" xreflabel="track_activities">
+      track_activities (boolean)
       
-       stats_command_string configuration parameter
+       track_activities configuration parameter
       
       
        
@@ -3225,80 +3214,33 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
       
      
 
-     
-      update_process_title (boolean)
-      
-       update_process_title configuration parameter
-      
-      
-       
-        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)
-      
-       stats_start_collector configuration parameter
-      
-      
-       
-        Controls whether the server should start the
-        statistics-collection subprocess.  This is on by default, but
-        can 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)
-      
-       stats_block_level configuration parameter
-      
-      
-       
-        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)
+     
+      track_counts (boolean)
       
-       stats_row_level configuration parameter
+       track_counts configuration parameter
       
       
        
-        Enables the collection of row-level statistics on database
-        activity. This parameter is on by default, because the autovacuum
+        Enables collection of statistics on database activity.
+        This parameter is on by default, because the autovacuum
         daemon needs the collected information.
         Only superusers can change this setting.
        
       
      
 
-     stats-reset-on-server-start" xreflabel="stats_reset_on_server_start">
-      stats_reset_on_server_start (boolean)
+     update-process-title" xreflabel="update_process_title">
+      update_process_title (boolean)
       
-       stats_reset_on_server_start configuration parameter
+       update_process_title configuration parameter
       
       
        
-        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.
+        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 by using the Process Explorer.
+        Only superusers can change this setting.
        
       
      
@@ -3369,50 +3311,50 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
       
        
         Controls whether the server should run the
-        autovacuum launcher daemon.  This is on by default.
-        <varname>stats_start_collector and stats_row_level
-        must also be turned on for autovacuum to work.
+        autovacuum launcher daemon.  This is on by default; however,
+        <xref linkend="guc-track-counts"> must also be turned on for
+        autovacuum to work.
         This parameter can only be set in the postgresql.conf
         file or on the server command line.
        
        
         Note that even when this parameter is disabled, the system
-        will periodically launch autovacuum processes in order to
+        will launch autovacuum processes if necessary to
         prevent transaction ID wraparound.  See 
         linkend="vacuum-for-wraparound"> for more information.
        
       
      
 
-     autovacuum-max-workers" xreflabel="autovacuum_max_workers">
-      autovacuum_max_workers (integer)
+     log-autovacuum-min-duration" xreflabel="log_autovacuum_min_duration">
+      log_autovacuum_min_duration (integer)
       
-       autovacuum_max_workers configuration parameter
+       log_autovacuum_min_duration configuration parameter
       
       
        
-        Specifies the maximum number of autovacuum processes (other than the
-        autovacuum launcher) which may be running at any one time.  The default
-        is three (3).  This parameter can only be set in
+        Causes each action executed by autovacuum to be logged if it ran for at
+        least the specified number of milliseconds.  Setting this to zero logs
+        all autovacuum actions. Minus-one (the default) disables logging
+        autovacuum actions.  For example, if you set this to
+        250ms then all automatic vacuums and analyzes that run
+        250ms or longer will be logged.  Enabling this parameter can be helpful
+        in tracking autovacuum activity.  This setting can only be set in
         the postgresql.conf file or on the server command line.
        
       
      
 
-     log-autovacuum" xreflabel="log_autovacuum">
-      log_autovacuum (integer)
+     autovacuum-max-workers" xreflabel="autovacuum_max_workers">
+      autovacuum_max_workers (integer)
       
-       log_autovacuum configuration parameter
+       autovacuum_max_workers configuration parameter
       
       
        
-        Causes each action executed by autovacuum to be logged if it ran for at
-        least the specified number of milliseconds.  Setting this to zero logs
-        all autovacuum actions. Minus-one (the default) disables logging
-        autovacuum actions.  For example, if you set this to
-        250ms then all vacuums and analyzes that run
-        250ms or longer will be logged.  Enabling this parameter can be helpful
-        in tracking autovacuum activity.  This setting can only be set in
+        Specifies the maximum number of autovacuum processes (other than the
+        autovacuum launcher) which may be running at any one time.  The default
+        is three.  This parameter can only be set in
         the postgresql.conf file or on the server command line.
        
       
index 40eecdc376ef0c335dfd27eed897d31229d63f08..3d87eeb329dd2bb2ae3cabc524323b368ad8f5af 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Routine Database Maintenance Tasks
   
 
   
-   Updating <span class="marked">planner s</span>tatistics
+   Updating <span class="marked">Planner S</span>tatistics
 
    
     statistics
   
 
   
-   Preventing <span class="marked">transaction ID wraparound f</span>ailures
+   Preventing <span class="marked">Transaction ID Wraparound F</span>ailures
 
    
     transaction ID
@@ -460,7 +460,7 @@ HINT:  Stop the postmaster and use a standalone backend to VACUUM in "mydb".
   
 
   
-   The auto-vacuum daemon
+   The Auto-Vacuum Daemon
 
    
     autovacuum
@@ -473,10 +473,9 @@ HINT:  Stop the postmaster and use a standalone backend to VACUUM in "mydb".
     VACUUM and ANALYZE  commands.
     When enabled, autovacuum checks for
     tables that have had a large number of inserted, updated or deleted
-    tuples.  These checks use the row-level statistics collection facility;
+    tuples.  These checks use the statistics collection facility;
     therefore, autovacuum cannot be used unless 
-    linkend="guc-stats-start-collector"> and 
-    linkend="guc-stats-row-level"> are set to true.
+    linkend="guc-track-counts"> is set to true.
     In the default configuration, autovacuuming is enabled and the related
     configuration parameters are appropriately set.
    
@@ -497,8 +496,8 @@ HINT:  Stop the postmaster and use a standalone backend to VACUUM in "mydb".
     eligible for vacuuming in a short amount of time, all autovacuum workers
     may end up vacuuming those tables for a very long time. This would result
     in other tables and databases not being vacuumed until a worker became
-    available. There is also not a limit on how many workers might be in a
-    single database, but workers do try and avoid repeating work that has
+    available. There is not a limit on how many workers might be in a
+    single database, but workers do try to avoid repeating work that has
     already been done by other workers. Note that the number of running
     workers does not count towards the  nor
     the  limits.
index c00d1a0d5a961cd1137ebee25bc50762a2ee02e3..a2536c91900554f38e5b9b98bc6a5f051fb8fa93 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Monitoring Database Activity
@@ -117,14 +117,15 @@ postgres: user database host 
    PostgreSQL's statistics collector
    is a subsystem that supports collection and reporting of information about
    server activity.  Presently, the collector can count accesses to tables
-   and indexes in both disk-block and individual-row terms.
+   and indexes in both disk-block and individual-row terms.  It also tracks
+   total numbers of rows in each table, and the last vacuum and analyze times
+   for each table.
   
 
   
    PostgreSQL also supports determining the exact
    command currently being executed by other server processes.  This is an
-   independent facility that can be enabled or disabled whether or not
-   block-level and row-level statistics are being collected.
+   independent facility that does not depend on the collector process.
   
 
  
@@ -139,31 +140,14 @@ postgres: user database host 
   
 
   
-   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 can 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  controls whether
+   information is actually sent to the collector process and thus determines
+   whether any run-time overhead occurs for event counting.
   
 
   
-   The parameters  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 tracks disk-block-level access
-   statistics and row-level access statistics and sends these to the collector.
-   Additionally, per-database transaction commit and abort statistics
-   are collected if either of these parameters are set.
-  
-
-  
-   The parameter  enables monitoring
+   The parameter  enables monitoring
    of the current command being executed by any server process.
-   The statistics collector subprocess need not be running to enable this
-   feature.
   
   
   
@@ -190,13 +174,13 @@ postgres: user database host 
   
    When using the statistics to monitor current activity, it is important
    to realize that the information does not update instantaneously.
-   Each individual server process transmits new block and row access counts to
+   Each individual server process transmits new statistical counts to
    the collector just before going idle; so a query or transaction still in
    progress does not affect the displayed totals.  Also, the collector itself
    emits a new report at most once per PGSTAT_STAT_INTERVAL
    milliseconds (500 unless altered while building the server).  So the
    displayed information lags behind actual activity.  However, current-query
-   information collected by stats_command_string is
+   information collected by track_activities is
    always up-to-date.
   
 
@@ -240,7 +224,7 @@ postgres: user database host 
       current query began execution, time at which the process was
       started, and client's address and port number.  The columns that
       report data on the current query are available unless the parameter
-      stats_command_string has been turned off.
+      track_activities has been turned off.
       Furthermore, these columns are only visible if the user examining
       the view is a superuser or the same as the user owning the process
       being reported on.
@@ -715,7 +699,7 @@ postgres: user database host 
        Active command of the given server process, but only if the
        current user is a superuser or the same user as that of
        the session being queried (and
-       stats_command_string is on)
+       track_activities is on)
       
      
 
@@ -726,7 +710,7 @@ postgres: user database host 
        True if the given server process is waiting for a lock,
        but only if the current user is a superuser or the same user as that of
        the session being queried (and
-       stats_command_string is on)
+       track_activities is on)
       
      
 
@@ -738,7 +722,7 @@ postgres: user database host 
        executing query was started, but only if the
        current user is a superuser or the same user as that of
        the session being queried (and
-       stats_command_string is on)
+       track_activities is on)
       
      
 
@@ -750,7 +734,7 @@ postgres: user database host 
        executing transaction was started, but only if the
        current user is a superuser or the same user as that of
        the session being queried (and
-       stats_command_string is on)
+       track_activities is on)
       
      
 
index a68dd592d6916adff79361c612f1a63bfa018bf0..e287770a6024e83fbc51fe2a472f8c5be079d45d 100644 (file)
@@ -1,4 +1,4 @@
-
+