11<!--
2- $PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.337 2005/07/06 14:45:12 momjian Exp $
2+ $PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.338 2005/07/14 05:13:38 tgl Exp $
33-->
44
55<chapter Id="runtime">
@@ -3173,7 +3173,7 @@ archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Windows
31733173 If on, collected statistics are zeroed out whenever the server
31743174 is restarted. If off, statistics are accumulated across server
31753175 restarts. The default is <literal>on</>. This option can only
3176- be set at server start.
3176+ be set at server start.
31773177 </para>
31783178 </listitem>
31793179 </varlistentry>
@@ -3182,6 +3182,127 @@ archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Windows
31823182 </sect3>
31833183 </sect2>
31843184
3185+ <sect2 id="runtime-config-autovacuum">
3186+ <title>Automatic Vacuuming</title>
3187+
3188+ <para>
3189+ Beginning in <productname>PostgreSQL</> 8.1, there is an optional server
3190+ process called the <firstterm>autovacuum daemon</>, whose purpose is
3191+ to automate the issuance of periodic <command>VACUUM</> and
3192+ <command>ANALYZE</> commands. When enabled, the autovacuum daemon
3193+ runs periodically and checks for tables that have had a large number
3194+ of updated or deleted tuples. This check uses the row-level statistics
3195+ collection facility; therefore, the autovacuum daemon cannot be used
3196+ unless <xref linkend="guc-stats-start-collector"> and
3197+ <xref linkend="guc-stats-row-level"> are set TRUE. Also, it's
3198+ important to allow a slot for the autovacuum process when choosing
3199+ the value of <xref linkend="guc-superuser-reserved-connections">.
3200+ </para>
3201+
3202+ <variablelist>
3203+
3204+ <varlistentry id="guc-autovacuum" xreflabel="autovacuum">
3205+ <term><varname>autovacuum</varname> (<type>boolean</type>)</term>
3206+ <indexterm>
3207+ <primary><varname>autovacuum</> configuration parameter</primary>
3208+ </indexterm>
3209+ <listitem>
3210+ <para>
3211+ Controls whether the server should start the
3212+ autovacuum subprocess. This is off by default.
3213+ This option can only be set at server start or in the
3214+ <filename>postgresql.conf</filename> file.
3215+ </para>
3216+ </listitem>
3217+ </varlistentry>
3218+
3219+ <varlistentry id="guc-autovacuum-naptime" xreflabel="autovacuum_naptime">
3220+ <term><varname>autovacuum_naptime</varname> (<type>integer</type>)</term>
3221+ <indexterm>
3222+ <primary><varname>autovacuum_naptime</> configuration parameter</primary>
3223+ </indexterm>
3224+ <listitem>
3225+ <para>
3226+ Specifies the delay between activity rounds for the autovacuum
3227+ subprocess. In each round the subprocess examines one database
3228+ and issues <command>VACUUM</> and <command>ANALYZE</> commands
3229+ as needed for tables in that database. The delay is measured
3230+ in seconds, and the default is 60.
3231+ This option can only be set at server start or in the
3232+ <filename>postgresql.conf</filename> file.
3233+ </para>
3234+ </listitem>
3235+ </varlistentry>
3236+
3237+ <varlistentry id="guc-autovacuum-vacuum-threshold" xreflabel="autovacuum_vacuum_threshold">
3238+ <term><varname>autovacuum_vacuum_threshold</varname> (<type>integer</type>)</term>
3239+ <indexterm>
3240+ <primary><varname>autovacuum_vacuum_threshold</> configuration parameter</primary>
3241+ </indexterm>
3242+ <listitem>
3243+ <para>
3244+ Specifies the minimum number of updated or deleted tuples needed
3245+ to trigger a <command>VACUUM</> in any one table.
3246+ The default is 1000.
3247+ This option can only be set at server start or in the
3248+ <filename>postgresql.conf</filename> file.
3249+ </para>
3250+ </listitem>
3251+ </varlistentry>
3252+
3253+ <varlistentry id="guc-autovacuum-analyze-threshold" xreflabel="autovacuum_analyze_threshold">
3254+ <term><varname>autovacuum_analyze_threshold</varname> (<type>integer</type>)</term>
3255+ <indexterm>
3256+ <primary><varname>autovacuum_analyze_threshold</> configuration parameter</primary>
3257+ </indexterm>
3258+ <listitem>
3259+ <para>
3260+ Specifies the minimum number of inserted, updated or deleted tuples
3261+ needed to trigger an <command>ANALYZE</> in any one table.
3262+ The default is 500.
3263+ This option can only be set at server start or in the
3264+ <filename>postgresql.conf</filename> file.
3265+ </para>
3266+ </listitem>
3267+ </varlistentry>
3268+
3269+ <varlistentry id="guc-autovacuum-vacuum-scale-factor" xreflabel="autovacuum_vacuum_scale_factor">
3270+ <term><varname>autovacuum_vacuum_scale_factor</varname> (<type>floating point</type>)</term>
3271+ <indexterm>
3272+ <primary><varname>autovacuum_vacuum_scale_factor</> configuration parameter</primary>
3273+ </indexterm>
3274+ <listitem>
3275+ <para>
3276+ Specifies a fraction of the table size to add to
3277+ <varname>autovacuum_vacuum_threshold</varname>
3278+ when deciding whether to trigger a <command>VACUUM</>.
3279+ The default is 0.4.
3280+ This option can only be set at server start or in the
3281+ <filename>postgresql.conf</filename> file.
3282+ </para>
3283+ </listitem>
3284+ </varlistentry>
3285+
3286+ <varlistentry id="guc-autovacuum-analyze-scale-factor" xreflabel="autovacuum_analyze_scale_factor">
3287+ <term><varname>autovacuum_analyze_scale_factor</varname> (<type>floating point</type>)</term>
3288+ <indexterm>
3289+ <primary><varname>autovacuum_analyze_scale_factor</> configuration parameter</primary>
3290+ </indexterm>
3291+ <listitem>
3292+ <para>
3293+ Specifies a fraction of the table size to add to
3294+ <varname>autovacuum_analyze_threshold</varname>
3295+ when deciding whether to trigger an <command>ANALYZE</>.
3296+ The default is 0.2.
3297+ This option can only be set at server start or in the
3298+ <filename>postgresql.conf</filename> file.
3299+ </para>
3300+ </listitem>
3301+ </varlistentry>
3302+
3303+ </variablelist>
3304+ </sect2>
3305+
31853306 <sect2 id="runtime-config-client">
31863307 <title>Client Connection Defaults</title>
31873308
0 commit comments