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

Commit28a8fa9

Browse files
committed
Improve autovacuum logging for aggressive and anti-wraparound runs
A log message was being generated when log_min_duration is reached forautovacuum on a given relation to indicate if it was an aggressive run,and missed the point of mentioning if it is doing an anti-wraproundrun. The log message generated is improved so as one, both or no extradetails are added depending on the option set.Author: Sergei KornilovReviewed-by: Masahiko Sawada, Michael PaquierDiscussion:https://postgr.es/m/11587951532155118@sas1-19a94364928d.qloud-c.yandex.net
1 parentf48fa2b commit28a8fa9

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

‎src/backend/commands/vacuumlazy.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,20 @@ lazy_vacuum_rel(Relation onerel, int options, VacuumParams *params,
374374
* emitting individual parts of the message when not applicable.
375375
*/
376376
initStringInfo(&buf);
377-
if (aggressive)
378-
msgfmt=_("automatic aggressive vacuum of table \"%s.%s.%s\": index scans: %d\n");
377+
if (params->is_wraparound)
378+
{
379+
if (aggressive)
380+
msgfmt=_("automatic aggressive vacuum to prevent wraparound of table \"%s.%s.%s\": index scans: %d\n");
381+
else
382+
msgfmt=_("automatic vacuum to prevent wraparound of table \"%s.%s.%s\": index scans: %d\n");
383+
}
379384
else
380-
msgfmt=_("automatic vacuum of table \"%s.%s.%s\": index scans: %d\n");
385+
{
386+
if (aggressive)
387+
msgfmt=_("automatic aggressive vacuum of table \"%s.%s.%s\": index scans: %d\n");
388+
else
389+
msgfmt=_("automatic vacuum of table \"%s.%s.%s\": index scans: %d\n");
390+
}
381391
appendStringInfo(&buf,msgfmt,
382392
get_database_name(MyDatabaseId),
383393
get_namespace_name(RelationGetNamespace(onerel)),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp