mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
VACUUM VERBOSE: tweak scanned_pages logic.
Commit 872770fd6c taught VACUUM VERBOSE and autovacuum logging to display the total number of pages scanned by VACUUM. This information was also displayed as a percentage of rel_pages in parenthesis, which makes it easy to spot trends over time and across tables. The instrumentation displayed "0 scanned (0.00% of total)" for totally empty tables. Tweak the instrumentation: have it show "0 scanned (100.00% of total)" for empty tables instead. This approach is clearer and more consistent.
This commit is contained in:
parent
7e12256b47
commit
6e20f4600a
@ -676,7 +676,7 @@ heap_vacuum_rel(Relation rel, VacuumParams *params,
|
||||
vacrel->removed_pages,
|
||||
vacrel->rel_pages,
|
||||
vacrel->scanned_pages,
|
||||
orig_rel_pages == 0 ? 0 :
|
||||
orig_rel_pages == 0 ? 100.0 :
|
||||
100.0 * vacrel->scanned_pages / orig_rel_pages);
|
||||
appendStringInfo(&buf,
|
||||
_("tuples: %lld removed, %lld remain, %lld are dead but not yet removable\n"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user