Text Size: Normal / Large

17.9. Automatic Vacuuming

These settings control the default behavior for the autovacuum daemon. Please refer to Section 22.1.4 for more information.

autovacuum (boolean)

Controls whether the server should start the autovacuum subprocess. This is off by default. stats_start_collector and stats_row_level must also be on for this to start. This option can be set at server start or in the postgresql.conf file.

autovacuum_naptime (integer)

Specifies the delay between activity rounds for the autovacuum subprocess. In each round the subprocess examines one database 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 be set at server start or in the postgresql.conf file.

autovacuum_vacuum_threshold (integer)

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 be set at server start or in the postgresql.conf file. This setting can be overridden for individual tables by entries in pg_autovacuum.

autovacuum_analyze_threshold (integer)

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 be set at server start or in the postgresql.conf file. This setting can be overridden for individual tables by entries in pg_autovacuum.

autovacuum_vacuum_scale_factor (floating point)

Specifies a fraction of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM. The default is 0.4. This option can be set at server start or in the postgresql.conf file. This setting can be overridden for individual tables by entries in pg_autovacuum.

autovacuum_analyze_scale_factor (floating point)

Specifies a fraction of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE. The default is 0.2. This option can be set at server start or in the postgresql.conf file. This setting can be overridden for individual tables by entries in pg_autovacuum.

autovacuum_vacuum_cost_delay (integer)

Specifies the cost delay value that will be used in automatic VACUUM operations. If -1 is specified (which is the default), the regular vacuum_cost_delay value will be used. This setting can be overridden for individual tables by entries in pg_autovacuum.

autovacuum_vacuum_cost_limit (integer)

Specifies the cost limit value that will be used in automatic VACUUM operations. If -1 is specified (which is the default), the regular vacuum_cost_limit value will be used. This setting can be overridden for individual tables by entries in pg_autovacuum.


User Comments

No comments could be found for this page.

Add Comment

Please use this form to add your own comments regarding your experience with particular features of PostgreSQL, clarifications of the documentation, or hints for other users. Please note, this is not a support forum, and your IP address will be logged. If you have a question or need help, please see the faq, try a mailing list, or join us on IRC. Note that submissions containing URLs or other keywords commonly found in 'spam' comments may be silently discarded. Please contact the webmaster if you think this is happening to you in error.

In order to submit a comment, you must have a community account.

* Comment
 

* denotes required field

Privacy Policy | Project hosted by hub.org | Designed by tinysofa
Copyright © 1996 – 2007 PostgreSQL Global Development Group