Clearify how processes are started by autovacuum, and what the effect

of autovacuum_max_workers parameter is.

Per discussion with Alvaro.
This commit is contained in:
Magnus Hagander 2008-12-08 20:31:00 +00:00
parent 4e00382b9a
commit f6bab28488

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.85 2007/11/28 15:42:31 petere Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.85.2.1 2008/12/08 20:31:00 mha Exp $ -->
<chapter id="maintenance">
<title>Routine Database Maintenance Tasks</title>
@ -488,10 +488,16 @@ HINT: Stop the postmaster and use a standalone backend to VACUUM in "mydb".
Beginning in <productname>PostgreSQL</productname> 8.3, autovacuum has a
multiprocess architecture: There is a daemon process, called the
<firstterm>autovacuum launcher</firstterm>, which is in charge of starting
an <firstterm>autovacuum worker</firstterm> process on each database every
<xref linkend="guc-autovacuum-naptime"> seconds. On each run, the worker
process checks each table within that database, and <command>VACUUM</> or
<command>ANALYZE</> commands are issued as needed.
<firstterm>autovacuum worker</firstterm> processes for all databases. The
launcher will distribute the work across time, but attempt to start one
worker on each database every <xref linkend="guc-autovacuum-naptime">
seconds. One worker will be launched for each database, with a maximum
of <xref linkend="guc-autovacuum-max-workers"> processes running at the
same time. If there are more than
<xref linkend="guc-autovacuum-max-workers"> databases to be processed,
the next database will be processed as soon as the first worker finishes.
The worker processes will check each table within its database and
execute <command>VACUUM</> and/or <command>ANALYZE</> as needed.
</para>
<para>