Content-Length: 260208 | pFad | http://github.com/postgrespro/postgres/commit/6e20f4600a420961817ce743be454080745f84d1

2D VACUUM VERBOSE: tweak scanned_pages logic. · postgrespro/postgres@6e20f46 · GitHub
Skip to content

Commit 6e20f46

Browse files
VACUUM VERBOSE: tweak scanned_pages logic.
Commit 872770f 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.
1 parent 7e12256 commit 6e20f46

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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/6e20f4600a420961817ce743be454080745f84d1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy