Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0f7acbe

Browse files
committed
Make lazy_vacuum_rel call pg_rusage_init only if needed.
do_analyze_rel already does it this way.Euler Taveira de Oliveira
1 parent24bf155 commit0f7acbe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎src/backend/commands/vacuumlazy.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,13 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt,
155155
boolscan_all;
156156
TransactionIdfreezeTableLimit;
157157

158-
pg_rusage_init(&ru0);
159-
160158
/* measure elapsed time iff autovacuum logging requires it */
161-
if (IsAutoVacuumWorkerProcess()&&Log_autovacuum_min_duration>0)
162-
starttime=GetCurrentTimestamp();
159+
if (IsAutoVacuumWorkerProcess()&&Log_autovacuum_min_duration >=0)
160+
{
161+
pg_rusage_init(&ru0);
162+
if (Log_autovacuum_min_duration>0)
163+
starttime=GetCurrentTimestamp();
164+
}
163165

164166
if (vacstmt->options&VACOPT_VERBOSE)
165167
elevel=INFO;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp