17.9. Automatic Vacuuming

These settings control the behavior of the autovacuum feature. Refer to Seção 22.1.4 for more information.

autovacuum (boolean)

Controls whether the server should run the autovacuum daemon. This is off by default. stats_start_collector and stats_row_level 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.

autovacuum_naptime (integer)

Specifies the delay between activity rounds for the autovacuum daemon. In each round the daemon 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 parameter can only be set in the postgresql.conf file or on the server command line.

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 500. 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.

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 250. 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.

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.2. 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.

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.1. 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.

autovacuum_freeze_max_age (integer)

Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. Note that the system will launch autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. The default is 200000000 (200 million). This parameter can only be set at server start, but the setting can be reduced for individual tables by entries in pg_autovacuum. For more information see Seção 22.1.3.

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 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.

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 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.

SourceForge.net Logo CSS válido!