*** doc/src/sgml/catalogs.sgml 4 Feb 2009 21:30:41 -0000 2.194
--- doc/src/sgml/catalogs.sgml 5 Feb 2009 18:32:40 -0000
***************
*** 89,99 ****
- pg_autovacuum
- per-relation autovacuum configuration parameters
-
-
- pg_castcasts (data type conversions)
--- 89,94 ----
***************
*** 1256,1433 ****
-
- pg_autovacuum
-
-
- pg_autovacuum
-
-
-
- autovacuum
- table-specific configuration
-
-
-
- The catalog pg_autovacuum stores optional
- per-relation configuration parameters for the autovacuum daemon.
- If there is an entry here for a particular relation, the given
- parameters will be used for autovacuuming that table. If no entry
- is present, the system-wide defaults will be used. For more information
- about the autovacuum daemon, see .
-
-
-
-
- It is likely that pg_autovacuum will disappear
- in a future release, with the information instead being kept in
- pg_class>.reloptions> entries.
-
-
-
-
- pg_autovacuum> Columns
-
-
-
-
- Name
- Type
- References
- Description
-
-
-
-
-
- vacrelid
- oid
- pg_class.oid
- The table this entry is for
-
-
-
- enabled
- bool
-
- If false, this table will not be autovacuumed, except
- to prevent transaction ID wraparound
-
-
-
- vac_base_thresh
- integer
-
- Minimum number of modified tuples before vacuum
-
-
-
- vac_scale_factor
- float4
-
- Multiplier for reltuples> to add to
- vac_base_thresh>
-
-
-
- anl_base_thresh
- integer
-
- Minimum number of modified tuples before analyze
-
-
-
- anl_scale_factor
- float4
-
- Multiplier for reltuples> to add to
- anl_base_thresh>
-
-
-
- vac_cost_delay
- integer
-
- Custom vacuum_cost_delay> parameter
-
-
-
- vac_cost_limit
- integer
-
- Custom vacuum_cost_limit> parameter
-
-
-
- freeze_min_age
- integer
-
- Custom vacuum_freeze_min_age> parameter
-
-
-
- freeze_max_age
- integer
-
- Custom autovacuum_freeze_max_age> parameter
-
-
-
- freeze_table_age
- integer
-
- Custom vacuum_freeze_table_age> parameter
-
-
-
-
-
-
- The autovacuum daemon will initiate a VACUUM> operation
- on a particular table when the number of updated or deleted tuples
- exceeds vac_base_thresh plus
- vac_scale_factor times the number of
- live tuples currently estimated to be in the relation.
- Similarly, it will initiate an ANALYZE> operation
- when the number of inserted, updated or deleted tuples
- exceeds anl_base_thresh plus
- anl_scale_factor times the number of
- live tuples currently estimated to be in the relation.
-
-
-
- Also, the autovacuum daemon will perform a VACUUM> operation
- to prevent transaction ID wraparound if the table's
- pg_class>.relfrozenxid> field attains an age
- of more than freeze_max_age> transactions, whether the table
- has been changed or not, even if
- pg_autovacuum>.enabled> is set to
- false> for it. The system will launch autovacuum to perform
- such VACUUM>s even if autovacuum is otherwise disabled.
- See for more about wraparound
- prevention.
-
-
-
- Any of the numerical fields can contain -1> (or indeed
- any negative value) to indicate that the system-wide default should
- be used for this particular value. Observe that the
- vac_cost_delay> variable inherits its default value from the
- configuration parameter,
- or from if the former is set to a
- negative value. The same applies to vac_cost_limit>.
- Also, autovacuum will ignore attempts to set a per-table
- freeze_max_age> larger than the system-wide setting (it can
- only be set smaller), and the freeze_min_age> value will be
- limited to half the system-wide setting. Note that while you
- can set freeze_max_age> very small, or even zero, this
- is usually unwise since it will force frequent vacuuming.
-
-
-
-
-
pg_cast
--- 1251,1256 ----
*** doc/src/sgml/config.sgml 16 Jan 2009 13:27:23 -0000 1.206
--- doc/src/sgml/config.sgml 6 Feb 2009 17:27:58 -0000
***************
*** 3547,3554 ****
The default is 50 tuples.
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>.
--- 3547,3554 ----
The default is 50 tuples.
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
! changing storage parameters.
***************
*** 3565,3572 ****
The default is 50 tuples.
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>.
--- 3565,3572 ----
The default is 50 tuples.
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
! changing storage parameters.
***************
*** 3584,3591 ****
The default is 0.2 (20% of table size).
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>.
--- 3584,3591 ----
The default is 0.2 (20% of table size).
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
! changing storage parameters.
***************
*** 3603,3610 ****
The default is 0.1 (10% of table size).
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>.
--- 3603,3610 ----
The default is 0.1 (10% of table size).
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
! changing storage parameters.
***************
*** 3624,3631 ****
autovacuum is otherwise disabled.
The default is 200 million transactions.
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 .
--- 3624,3631 ----
autovacuum is otherwise disabled.
The default is 200 million transactions.
This parameter can only be set at server start, but the setting
! can be reduced for individual tables by
! changing storage parameters.
For more information see .
***************
*** 3645,3652 ****
The default value is 20 milliseconds.
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>.
--- 3645,3652 ----
The default value is 20 milliseconds.
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
! changing storage parameters.
***************
*** 3667,3674 ****
each worker never exceeds the limit on this variable.
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>.
--- 3667,3674 ----
each worker never exceeds the limit on this variable.
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
! changing storage parameters.
*** doc/src/sgml/maintenance.sgml 16 Jan 2009 13:27:23 -0000 1.89
--- doc/src/sgml/maintenance.sgml 6 Feb 2009 14:26:44 -0000
***************
*** 573,579 ****
Tables whose relfrozenxid> value is more than
autovacuum_freeze_max_age> transactions old are always
! vacuumed. Otherwise, if the number of tuples obsoleted since the last
VACUUM exceeds the vacuum threshold, the
table is vacuumed. The vacuum threshold is defined as:
--- 573,581 ----
Tables whose relfrozenxid> value is more than
autovacuum_freeze_max_age> transactions old are always
! vacuumed (this also applies to those tables whose freeze max age has
! been modified via storage parameters; see below). Otherwise, if the
! number of tuples obsoleted since the last
VACUUM exceeds the vacuum threshold, the
table is vacuumed. The vacuum threshold is defined as:
***************
*** 604,669 ****
The default thresholds and scale factors are taken from
postgresql.conf, but it is possible to override them
! on a table-by-table basis by making entries in the system catalog
! pg_autovacuum>.
! If a pg_autovacuum row exists for a particular
! table, the settings it specifies are applied; otherwise the global
! settings are used. See for
more details on the global settings.
! Besides the base threshold values and scale factors, there are five
! more parameters that can be set for each table in
! pg_autovacuum.
! The first, pg_autovacuum>.enabled>,
can be set to false to instruct the autovacuum daemon
to skip that particular table entirely. In this case
autovacuum will only touch the table if it must do so
to prevent transaction ID wraparound.
! The next two parameters, the vacuum cost delay
! (pg_autovacuum.vac_cost_delay)
! and the vacuum cost limit
! (pg_autovacuum.vac_cost_limit),
! are used to set table-specific values for the
!
feature.
! The last two parameters,
! (pg_autovacuum.freeze_min_age)
! and
! (pg_autovacuum.freeze_max_age),
! are used to set table-specific values for
! and
! respectively.
- If any of the values in pg_autovacuum
- are set to a negative number, or if a row is not present at all in
- pg_autovacuum for any particular table, the
- corresponding values from postgresql.conf are used.
-
-
-
- There is not currently any support for making
- pg_autovacuum entries, except by doing
- manual INSERT>s into the catalog. This feature will be
- improved in future releases, and it is likely that the catalog
- definition will change.
-
-
-
-
- The contents of the pg_autovacuum system
- catalog are currently not saved in database dumps created by the
- tools pg_dump> and pg_dumpall>. If
- you want to preserve them across a dump/reload cycle, make sure
- you dump the catalog manually.
-
-
-
-
When multiple workers are running, the cost limit is
balanced among all the running workers, so that the
total impact on the system is the same, regardless of the number
--- 606,645 ----
The default thresholds and scale factors are taken from
postgresql.conf, but it is possible to override them
! on a table-by-table basis; see
! for more information.
! If a setting
! has been changed via storage parameters, that value is used; otherwise the
! global settings are used. See for
more details on the global settings.
! Besides the base threshold values and scale factors, there are six
! more autovacuum parameters that can be set for each table via
! storage parameters.
! The first parameter, autovacuum_enabled>,
can be set to false to instruct the autovacuum daemon
to skip that particular table entirely. In this case
autovacuum will only touch the table if it must do so
to prevent transaction ID wraparound.
! Another two parameters,
! autovacuum_vacuum_cost_delay and
! autovacuum_vacuum_cost_limit, are used to set
! table-specific values for the
!
feature.
! autovacuum_freeze_min_age,
! autovacuum_freeze_max_age and
! autovacuum_freeze_table_age are used to set
! values for ,
! and
! respectively.
When multiple workers are running, the cost limit is
balanced among all the running workers, so that the
total impact on the system is the same, regardless of the number
*** doc/src/sgml/ref/alter_index.sgml 14 Nov 2008 10:22:45 -0000 1.14
--- doc/src/sgml/ref/alter_index.sgml 29 Jan 2009 17:23:12 -0000
***************
*** 75,80 ****
--- 75,90 ----
+
+ value
+
+
+ The new value for a storage parameter.
+ This might be a number or a word depending on the parameter.
+
+
+
+
RESET ( storage_parameter [, ... ] )
*** doc/src/sgml/ref/alter_table.sgml 13 Dec 2008 19:13:44 -0000 1.102
--- doc/src/sgml/ref/alter_table.sgml 6 Feb 2009 14:07:49 -0000
***************
*** 286,292 ****
This form changes one or more storage parameters for the table. See
!
for details on the available parameters. Note that the table contents
will not be modified immediately by this command; depending on the
parameter you might need to rewrite the table to get the desired effects.
--- 286,293 ----
This form changes one or more storage parameters for the table. See
!
for details on the available parameters. Note that the table contents
will not be modified immediately by this command; depending on the
parameter you might need to rewrite the table to get the desired effects.
*** doc/src/sgml/ref/create_table.sgml 2 Feb 2009 19:31:38 -0000 1.112
--- doc/src/sgml/ref/create_table.sgml 6 Feb 2009 14:20:05 -0000
***************
*** 685,703 ****
Storage Parameters
The WITH> clause can specify storage parameters>
for tables, and for indexes associated with a UNIQUE or
PRIMARY KEY constraint. Storage parameters for
indexes are documented in . The storage parameters currently
! available for tables are:
! FILLFACTOR>
The fillfactor for a table is a percentage between 10 and 100.
--- 685,713 ----
Storage Parameters
+
+ storage parameters
+
+
The WITH> clause can specify storage parameters>
for tables, and for indexes associated with a UNIQUE or
PRIMARY KEY constraint. Storage parameters for
indexes are documented in . The storage parameters currently
! available for tables are listed below. For each parameter, there is an
! additional, identically named parameter, prefixed with
! toast. which can be used to control the behavior of the
! supplementary storage table, if any; see .
! Note that the supplementary storage table inherits the
! autovacuum values from its parent table, if there are
! no toast.autovacuum_* settings set.
! fillfactor>, toast.fillfactor (integer>)
The fillfactor for a table is a percentage between 10 and 100.
***************
*** 715,725 ****
! TOAST.FILLFACTOR
! Same as above, for the supplementary storage table, if any; see
! .
--- 725,842 ----
! autovacuum_enabled>, toast.autovacuum_enabled (boolean>)
!
!
! Enables or disables the autovacuum daemon on a particular table.
! If true, the autovacuum daemon will initiate a VACUUM> operation
! on a particular table when the number of updated or deleted tuples exceeds
! autovacuum_vacuum_threshold> plus
! autovacuum_vacuum_scale_factor> times the number of live tuples
! currently estimated to be in the relation.
! Similarly, it will initiate an ANALYZE> operation when the
! number of inserted, updated or deleted tuples exceeds
! autovacuum_analyze_threshold> plus
! autovacuum_analyze_scale_factor> times the number of live tuples
! currently estimated to be in the relation.
! If false, this table will not be autovacuumed, except to prevent
! transaction Id wraparound. See for
! more about wraparound prevention.
! Observe that this variable inherits its value from the setting.
!
!
!
!
!
! autovacuum_vacuum_threshold>, toast.autovacuum_vacuum_threshold (integer>)
!
!
! Minimum number of updated or deleted tuples before initiate a
! VACUUM> operation on a particular table.
!
!
!
!
!
! autovacuum_vacuum_scale_factor>, toast.autovacuum_vacuum_scale_factor (float4>)
!
!
! Multiplier for reltuples> to add to
! autovacuum_vacuum_threshold>.
!
!
!
!
!
! autovacuum_analyze_threshold>, toast.autovacuum_analyze_threshold (integer>)
!
!
! Minimum number of inserted, updated, or deleted tuples before initiate an
! ANALYZE> operation on a particular table.
!
!
!
!
!
! autovacuum_analyze_scale_factor>, toast.autovacuum_analyze_scale_factor (float4>)
!
!
! Multiplier for reltuples> to add to
! autovacuum_analyze_threshold>.
!
!
!
!
!
! autovacuum_vacuum_cost_delay>, toast.autovacuum_vacuum_cost_delay (integer>)
!
!
! Custom parameter.
!
!
!
!
!
! autovacuum_vacuum_cost_limit>, toast.autovacuum_vacuum_cost_limit (integer>)
!
!
! Custom parameter.
!
!
!
!
!
! autovacuum_freeze_min_age>, toast.autovacuum_freeze_min_age (integer>)
!
!
! Custom parameter. Note that
! autovacuum will ignore attempts to set a per-table
! autovacuum_freeze_min_age> larger than the half system-wide
! setting.
!
!
!
!
!
! autovacuum_freeze_max_age>, toast.autovacuum_freeze_max_age (integer>)
!
!
! Custom parameter. Note that
! autovacuum will ignore attempts to set a per-table
! autovacuum_freeze_max_age> larger than the system-wide setting
! (it can only be set smaller). Note that while you can set
! autovacuum_freeze_max_age> very small, or even zero, this is
! usually unwise since it will force frequent vacuuming.
!
!
!
!
!
! autovacuum_freeze_table_age (integer)
! Custom parameter.