pgsql: Add a multi-worker capability to autovacuum.

From: alvherre(at)postgresql(dot)org (Alvaro Herrera)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add a multi-worker capability to autovacuum.
Date: 2007-04-16 18:30:04
Message-ID: 20070416183006.A56BD9FB7FB@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Add a multi-worker capability to autovacuum. This allows multiple worker
processes to be running simultaneously. Also, now autovacuum processes do not
count towards the max_connections limit; they are counted separately from
regular processes, and are limited by the new GUC variable
autovacuum_max_workers.

The launcher now has intelligence to launch workers on each database every
autovacuum_naptime seconds, limited only on the max amount of worker slots
available.

Also, the global worker I/O utilization is limited by the vacuum cost-based
delay feature. Workers are "balanced" so that the total I/O consumption does
not exceed the established limit. This part of the patch was contributed by
ITAGAKI Takahiro.

Per discussion.

Modified Files:
--------------
pgsql/doc/src/sgml:
config.sgml (r1.119 -> r1.120)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/config.sgml.diff?r1=1.119&r2=1.120)
maintenance.sgml (r1.70 -> r1.71)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/maintenance.sgml.diff?r1=1.70&r2=1.71)
pgsql/src/backend/commands:
vacuum.c (r1.349 -> r1.350)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuum.c.diff?r1=1.349&r2=1.350)
pgsql/src/backend/postmaster:
autovacuum.c (r1.40 -> r1.41)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/autovacuum.c.diff?r1=1.40&r2=1.41)
pgsql/src/backend/storage/lmgr:
proc.c (r1.187 -> r1.188)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/proc.c.diff?r1=1.187&r2=1.188)
pgsql/src/backend/utils/init:
globals.c (r1.100 -> r1.101)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/globals.c.diff?r1=1.100&r2=1.101)
pgsql/src/backend/utils/misc:
guc.c (r1.384 -> r1.385)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c.diff?r1=1.384&r2=1.385)
postgresql.conf.sample (r1.213 -> r1.214)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/postgresql.conf.sample.diff?r1=1.213&r2=1.214)
pgsql/src/include:
miscadmin.h (r1.193 -> r1.194)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/miscadmin.h.diff?r1=1.193&r2=1.194)
pgsql/src/include/postmaster:
autovacuum.h (r1.8 -> r1.9)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/postmaster/autovacuum.h.diff?r1=1.8&r2=1.9)
pgsql/src/include/storage:
lwlock.h (r1.35 -> r1.36)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/lwlock.h.diff?r1=1.35&r2=1.36)
proc.h (r1.97 -> r1.98)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/proc.h.diff?r1=1.97&r2=1.98)

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2007-04-16 18:39:19 pgsql: Enable IPV6 for all MSVC builds, including the VC6 libpq-only
Previous Message Tom Lane 2007-04-16 18:21:07 pgsql: Make plancache store cursor options so it can pass them to