1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Autovacuum loose end mop-up. Provide autovacuum-specific vacuum cost

delay and limit, both as global GUCs and as table-specific entries in
pg_autovacuum.  stats_reset_on_server_start is now OFF by default,
but a reset is forced if we did WAL replay.  XID-wrap vacuums do not
ANALYZE, but do FREEZE if it's a template database.  Alvaro Herrera
This commit is contained in:
Tom Lane
2005-08-11 21:11:50 +00:00
parent f6c30d54fa
commit d90c531188
18 changed files with 456 additions and 209 deletions

View File

@ -1,6 +1,6 @@
<!--
Documentation of the system catalogs, directed toward PostgreSQL developers
$PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.110 2005/07/31 17:19:16 tgl Exp $
$PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.111 2005/08/11 21:11:41 tgl Exp $
-->
<chapter id="catalogs">
@ -1197,6 +1197,20 @@
<entry>Multiplier for reltuples to add to
<structfield>anl_base_thresh</></entry>
</row>
<row>
<entry><structfield>vac_cost_delay</structfield></entry>
<entry><type>integer</type></entry>
<entry></entry>
<entry>Custom <varname>vacuum_cost_delay</> parameter</entry>
</row>
<row>
<entry><structfield>vac_cost_limit</structfield></entry>
<entry><type>integer</type></entry>
<entry></entry>
<entry>Custom <varname>vacuum_cost_limit</> parameter</entry>
</row>
</tbody>
</tgroup>
</table>
@ -1217,7 +1231,11 @@
<para>
Any of the numerical fields can contain <literal>-1</> (or indeed
any negative value) to indicate that the system-wide default should
be used for this particular value.
be used for this particular value. Observe that the
<structfield>vac_cost_delay</> variable inherits its default value from the
<varname>autovacuum_vacuum_cost_delay</> configuration parameter,
or from <varname>vacuum_cost_delay</> if the former is set to a negative
value. The same applies to <structfield>vac_cost_limit</>.
</para>
</sect1>

View File

@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.343 2005/08/09 05:01:10 momjian Exp $
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.344 2005/08/11 21:11:42 tgl Exp $
-->
<chapter Id="runtime">
@ -3296,7 +3296,7 @@ SELECT * FROM parent WHERE key = 2400;
<para>
If on, collected statistics are zeroed out whenever the server
is restarted. If off, statistics are accumulated across server
restarts. The default is <literal>on</>. This option can only
restarts. The default is <literal>off</>. This option can only
be set at server start.
</para>
</listitem>
@ -3424,6 +3424,40 @@ SELECT * FROM parent WHERE key = 2400;
</listitem>
</varlistentry>
<varlistentry id="guc-autovacuum-vacuum-cost-delay" xreflabel="autovacuum_vacuum_cost_delay">
<term><varname>autovacuum_vacuum_cost_delay</varname> (<type>integer</type>)</term>
<indexterm>
<primary><varname>autovacuum_vacuum_cost_delay</> configuration parameter</primary>
</indexterm>
<listitem>
<para>
Specifies the cost delay value that will be used in automatic
<command>VACUUM</> operations. If -1 is specified (which is the
default), the regular
<xref linkend="guc-vacuum-cost-delay"> value will be used.
This setting can be overridden for individual tables by entries in
<structname>pg_autovacuum</>.
</para>
</listitem>
</varlistentry>
<varlistentry id="guc-autovacuum-vacuum-cost-limit" xreflabel="autovacuum_vacuum_cost_limit">
<term><varname>autovacuum_vacuum_cost_limit</varname> (<type>integer</type>)</term>
<indexterm>
<primary><varname>autovacuum_vacuum_cost_limit</> configuration parameter</primary>
</indexterm>
<listitem>
<para>
Specifies the cost limit value that will be used in automatic
<command>VACUUM</> operations. If -1 is specified (which is the
default), the regular
<xref linkend="guc-vacuum-cost-limit"> value will be used.
This setting can be overridden for individual tables by entries in
<structname>pg_autovacuum</>.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>