git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 24bf155)
Make lazy_vacuum_rel call pg_rusage_init only if needed.
2011年8月18日 13:55:04 +0000 (09:55 -0400)
2011年8月18日 13:55:04 +0000 (09:55 -0400)
do_analyze_rel already does it this way.

Euler Taveira de Oliveira


diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c
index c5bf32e00fa8a1fed84a3c6758b68c29a51cd57d..b5547c5e757cd5e2fa3ccdf54d559db3d6ecff8a 100644 (file)
--- a/src/backend/commands/vacuumlazy.c
+++ b/src/backend/commands/vacuumlazy.c
@@ -155,11 +155,13 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt,
bool scan_all;
TransactionId freezeTableLimit;
- pg_rusage_init(&ru0);
-
/* measure elapsed time iff autovacuum logging requires it */
- if (IsAutoVacuumWorkerProcess() && Log_autovacuum_min_duration > 0)
- starttime = GetCurrentTimestamp();
+ if (IsAutoVacuumWorkerProcess() && Log_autovacuum_min_duration >= 0)
+ {
+ pg_rusage_init(&ru0);
+ if (Log_autovacuum_min_duration > 0)
+ starttime = GetCurrentTimestamp();
+ }
if (vacstmt->options & VACOPT_VERBOSE)
elevel = INFO;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /