OSDN Git Service

Add a multi-worker capability to autovacuum. This allows multiple worker
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 16 Apr 2007 18:30:04 +0000 (18:30 +0000)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 16 Apr 2007 18:30:04 +0000 (18:30 +0000)
commite2a186b03cc1a87cf26644db18f28a20f10bd739
treea11e944e89e9757808f6d86dc9aa79ea6a94948a
parent42dc4b66e61cde4beb466561f12fd490b6621ee3
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.
12 files changed:
doc/src/sgml/config.sgml
doc/src/sgml/maintenance.sgml
src/backend/commands/vacuum.c
src/backend/postmaster/autovacuum.c
src/backend/storage/lmgr/proc.c
src/backend/utils/init/globals.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/miscadmin.h
src/include/postmaster/autovacuum.h
src/include/storage/lwlock.h
src/include/storage/proc.h