From 00e6a16d01683762c2f34eb4909fc739093ab3bf Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 31 Aug 2009 19:41:00 +0000 Subject: Change the autovacuum launcher to read pg_database directly, rather than via the "flat files" facility. This requires making it enough like a backend to be able to run transactions; it's no longer an "auxiliary process" but more like the autovacuum worker processes. Also, its signal handling has to be brought into line with backends/workers. In particular, since it now has to handle procsignal.c processing, the special autovac-launcher-only signal conditions are moved to SIGUSR2. Alvaro, with some cleanup from Tom --- src/include/postmaster/autovacuum.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/include/postmaster') diff --git a/src/include/postmaster/autovacuum.h b/src/include/postmaster/autovacuum.h index 3175487af3f..dcdf57cdd42 100644 --- a/src/include/postmaster/autovacuum.h +++ b/src/include/postmaster/autovacuum.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/postmaster/autovacuum.h,v 1.15 2009/01/01 17:24:01 momjian Exp $ + * $PostgreSQL: pgsql/src/include/postmaster/autovacuum.h,v 1.16 2009/08/31 19:41:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -37,6 +37,8 @@ extern int Log_autovacuum_min_duration; extern bool AutoVacuumingActive(void); extern bool IsAutoVacuumLauncherProcess(void); extern bool IsAutoVacuumWorkerProcess(void); +#define IsAnyAutoVacuumProcess() \ + (IsAutoVacuumLauncherProcess() || IsAutoVacuumWorkerProcess()) /* Functions to start autovacuum process, called from postmaster */ extern void autovac_init(void); -- cgit v1.2.3