diff options
| author | Alvaro Herrera | 2007-04-16 18:30:04 +0000 |
|---|---|---|
| committer | Alvaro Herrera | 2007-04-16 18:30:04 +0000 |
| commit | e2a186b03cc1a87cf26644db18f28a20f10bd739 (patch) | |
| tree | a11e944e89e9757808f6d86dc9aa79ea6a94948a /src/backend/commands | |
| parent | 42dc4b66e61cde4beb466561f12fd490b6621ee3 (diff) | |
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.
Diffstat (limited to 'src/backend/commands')
| -rw-r--r-- | src/backend/commands/vacuum.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index d350420ab28..f275448756f 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -13,7 +13,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.349 2007/03/14 18:48:55 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/vacuum.c,v 1.350 2007/04/16 18:29:50 alvherre Exp $ * *------------------------------------------------------------------------- */ @@ -3504,6 +3504,9 @@ vacuum_delay_point(void) VacuumCostBalance = 0; + /* update balance values for workers */ + AutoVacuumUpdateDelay(); + /* Might have gotten an interrupt while sleeping */ CHECK_FOR_INTERRUPTS(); } |
