diff options
Diffstat (limited to 'src/backend/commands')
-rw-r--r-- | src/backend/commands/analyze.c | 12 | ||||
-rw-r--r-- | src/backend/commands/vacuumlazy.c | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index d77aec2dd74..418dbaa1084 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.108 2007/05/30 20:11:56 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/analyze.c,v 1.109 2007/09/24 03:12:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -202,10 +202,10 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt, } /* measure elapsed time iff autovacuum logging requires it */ - if (IsAutoVacuumWorkerProcess() && Log_autovacuum >= 0) + if (IsAutoVacuumWorkerProcess() && Log_autovacuum_min_duration >= 0) { pg_rusage_init(&ru0); - if (Log_autovacuum > 0) + if (Log_autovacuum_min_duration > 0) starttime = GetCurrentTimestamp(); } @@ -472,11 +472,11 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt, relation_close(onerel, NoLock); /* Log the action if appropriate */ - if (IsAutoVacuumWorkerProcess() && Log_autovacuum >= 0) + if (IsAutoVacuumWorkerProcess() && Log_autovacuum_min_duration >= 0) { - if (Log_autovacuum == 0 || + if (Log_autovacuum_min_duration == 0 || TimestampDifferenceExceeds(starttime, GetCurrentTimestamp(), - Log_autovacuum)) + Log_autovacuum_min_duration)) ereport(LOG, (errmsg("automatic analyze of table \"%s.%s.%s\" system usage: %s", get_database_name(MyDatabaseId), diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 564ab8d9fdd..df8951ee1e7 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -36,7 +36,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.98 2007/09/20 21:43:27 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/vacuumlazy.c,v 1.99 2007/09/24 03:12:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -154,7 +154,7 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt, pg_rusage_init(&ru0); /* measure elapsed time iff autovacuum logging requires it */ - if (IsAutoVacuumWorkerProcess() && Log_autovacuum > 0) + if (IsAutoVacuumWorkerProcess() && Log_autovacuum_min_duration > 0) starttime = GetCurrentTimestamp(); if (vacstmt->verbose) @@ -221,11 +221,11 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt, vacstmt->analyze, vacrelstats->rel_tuples); /* and log the action if appropriate */ - if (IsAutoVacuumWorkerProcess() && Log_autovacuum >= 0) + if (IsAutoVacuumWorkerProcess() && Log_autovacuum_min_duration >= 0) { - if (Log_autovacuum == 0 || + if (Log_autovacuum_min_duration == 0 || TimestampDifferenceExceeds(starttime, GetCurrentTimestamp(), - Log_autovacuum)) + Log_autovacuum_min_duration)) ereport(LOG, (errmsg("automatic vacuum of table \"%s.%s.%s\": index scans: %d\n" "pages: %d removed, %d remain\n" |