summaryrefslogtreecommitdiff
path: root/src/backend/utils/init
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2007-04-16 18:30:04 +0000
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2007-04-16 18:30:04 +0000
commite2a186b03cc1a87cf26644db18f28a20f10bd739 (patch)
treea11e944e89e9757808f6d86dc9aa79ea6a94948a /src/backend/utils/init
parent42dc4b66e61cde4beb466561f12fd490b6621ee3 (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/utils/init')
-rw-r--r--src/backend/utils/init/globals.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/utils/init/globals.c b/src/backend/utils/init/globals.c
index 130244b5e55..b5b11500566 100644
--- a/src/backend/utils/init/globals.c
+++ b/src/backend/utils/init/globals.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/init/globals.c,v 1.100 2007/01/05 22:19:44 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/init/globals.c,v 1.101 2007/04/16 18:29:54 alvherre Exp $
*
* NOTES
* Globals used all over the place should be declared here and not
@@ -95,9 +95,14 @@ bool allowSystemTableMods = false;
int work_mem = 1024;
int maintenance_work_mem = 16384;
-/* Primary determinants of sizes of shared-memory structures: */
+/*
+ * Primary determinants of sizes of shared-memory structures. MaxBackends is
+ * MaxConnections + autovacuum_max_workers (it is computed by the GUC assign
+ * hook):
+ */
int NBuffers = 1000;
int MaxBackends = 100;
+int MaxConnections = 90;
int VacuumCostPageHit = 1; /* GUC parameters for vacuum */
int VacuumCostPageMiss = 10;