Commit d3609dd
committed
Fix multi-table VACUUM VERBOSE accounting.
Per-backend global variables like VacuumPageHit are initialized once per
VACUUM command. This was missed by commit 49c9d9f, which unified
VACUUM VERBOSE and autovacuum logging. As a result of that oversight,
incorrect values were shown when multiple relations were processed by a
single VACUUM VERBOSE command.
Relations that happened to be processed later on would show "buffer
usage:" values that incorrectly included buffer accesses made while
processing earlier unrelated relations. The same accesses were counted
multiple times.
To fix, take initial values for the tracker variables at the start of
heap_vacuum_rel(), and report delta values later on.1 parent 7129a97 commit d3609dd
1 file changed
+15
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
329 | | - | |
330 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
331 | 334 | | |
332 | 335 | | |
333 | 336 | | |
| |||
639 | 642 | | |
640 | 643 | | |
641 | 644 | | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
642 | 648 | | |
643 | 649 | | |
644 | 650 | | |
645 | 651 | | |
646 | 652 | | |
647 | | - | |
| 653 | + | |
648 | 654 | | |
649 | 655 | | |
650 | 656 | | |
| |||
763 | 769 | | |
764 | 770 | | |
765 | 771 | | |
766 | | - | |
| 772 | + | |
767 | 773 | | |
768 | | - | |
| 774 | + | |
769 | 775 | | |
770 | 776 | | |
771 | 777 | | |
772 | 778 | | |
773 | 779 | | |
774 | 780 | | |
775 | | - | |
776 | | - | |
777 | | - | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
778 | 784 | | |
779 | 785 | | |
780 | 786 | | |
| |||
0 commit comments