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

Commit6e20f46

Browse files
VACUUM VERBOSE: tweak scanned_pages logic.
Commit872770f taught VACUUM VERBOSE and autovacuum logging todisplay the total number of pages scanned by VACUUM. This informationwas also displayed as a percentage of rel_pages in parenthesis, whichmakes it easy to spot trends over time and across tables.The instrumentation displayed "0 scanned (0.00% of total)" for totallyempty tables. Tweak the instrumentation: have it show "0 scanned(100.00% of total)" for empty tables instead. This approach is clearerand more consistent.
1 parent7e12256 commit6e20f46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/access/heap/vacuumlazy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ heap_vacuum_rel(Relation rel, VacuumParams *params,
676676
vacrel->removed_pages,
677677
vacrel->rel_pages,
678678
vacrel->scanned_pages,
679-
orig_rel_pages==0 ?0 :
679+
orig_rel_pages==0 ?100.0 :
680680
100.0*vacrel->scanned_pages /orig_rel_pages);
681681
appendStringInfo(&buf,
682682
_("tuples: %lld removed, %lld remain, %lld are dead but not yet removable\n"),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp