*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
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);
}
* 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));
/* 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");