aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2008-07-21 15:27:08 +0000
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2008-07-21 15:27:08 +0000
commitdf10fbab76cc4ef2d54d896d1e3abc6ce003d580 (patch)
treee1745e3b394031a79fc34da056d1a8c082c3c360
parentdf22da617324df467251a09e77798a7052417b85 (diff)
downloadpostgresql-df10fbab76cc4ef2d54d896d1e3abc6ce003d580.tar.gz
postgresql-df10fbab76cc4ef2d54d896d1e3abc6ce003d580.zip
Publish more openly the fact that autovacuum is working for wraparound
protection. Simon Riggs
-rw-r--r--src/backend/postmaster/autovacuum.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index 833e258c8eb..36653f83d31 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -55,7 +55,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.71.2.4 2008/07/17 21:02:41 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.71.2.5 2008/07/21 15:27:08 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -291,7 +291,7 @@ static HeapTuple get_pg_autovacuum_tuple_relid(Relation avRel, Oid relid);
static PgStat_StatTabEntry *get_pgstat_tabentry_relid(Oid relid, bool isshared,
PgStat_StatDBEntry *shared,
PgStat_StatDBEntry *dbentry);
-static void autovac_report_activity(VacuumStmt *vacstmt, Oid relid);
+static void autovac_report_activity(VacuumStmt *vacstmt, Oid relid, bool for_wraparound);
static void avl_sighup_handler(SIGNAL_ARGS);
static void avl_sigusr1_handler(SIGNAL_ARGS);
static void avl_sigterm_handler(SIGNAL_ARGS);
@@ -2633,7 +2633,7 @@ autovacuum_do_vac_analyze(Oid relid, bool dovacuum, bool doanalyze,
MemoryContextSwitchTo(old_cxt);
/* Let pgstat know what we're doing */
- autovac_report_activity(&vacstmt, relid);
+ autovac_report_activity(&vacstmt, relid, for_wraparound);
vacuum(&vacstmt, relids, bstrategy, for_wraparound, true);
}
@@ -2650,7 +2650,7 @@ autovacuum_do_vac_analyze(Oid relid, bool dovacuum, bool doanalyze,
* bother to report "<IDLE>" or some such.
*/
static void
-autovac_report_activity(VacuumStmt *vacstmt, Oid relid)
+autovac_report_activity(VacuumStmt *vacstmt, Oid relid, bool for_wraparound)
{
char *relname = get_rel_name(relid);
char *nspname = get_namespace_name(get_rel_namespace(relid));
@@ -2661,8 +2661,9 @@ autovac_report_activity(VacuumStmt *vacstmt, Oid relid)
/* Report the command and possible options */
if (vacstmt->vacuum)
snprintf(activity, MAX_AUTOVAC_ACTIV_LEN,
- "autovacuum: VACUUM%s",
- vacstmt->analyze ? " ANALYZE" : "");
+ "autovacuum: VACUUM%s%s",
+ vacstmt->analyze ? " ANALYZE" : "",
+ for_wraparound ? " (to prevent wraparound)" : "");
else
snprintf(activity, MAX_AUTOVAC_ACTIV_LEN,
"autovacuum: ANALYZE");