forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5cd72cc
committed
Fix parallel vacuum buffer usage reporting.
A parallel worker's buffer usage is accumulated to its pgBufferUsageand then is accumulated into the leader's one at the end of theparallel vacuum. However, since the leader process used to usededicated VacuumPage{Hit, Miss, Dirty} globals for the buffer usagereporting, the worker's buffer usage was not included, leading to anincorrect buffer usage report.To fix the problem, this commit makes vacuum use pgBufferUsageinstruments for buffer usage reporting instead of VacuumPage{Hit,Miss, Dirty} globals. These global variables are still used by ANALYZEcommand and autoanalyze.This also fixes the buffer usage report of vacuuming on temporarytables, since the buffers dirtied by MarkLocalBufferDirty() were nottracked by the VacuumPageDirty variable.Parallel vacuum was introduced in 13, but the buffer usage reportingfor VACUUM command with the VERBOSE option was implemented in15. So backpatch to 15.Reported-by: Anthonin BonnefoyAuthor: Anthonin BonnefoyReviewed-by: Alena Rybakina, Masahiko SawadaDiscussion:https://postgr.es/m/CAO6_XqrQk+QZQcYs_C6nk0cMfHuUWk85vT9CrcA1NffFbAVE2A@mail.gmail.comBackpatch-through: 151 parent2800fbb commit5cd72cc
1 file changed
+11
-13
lines changedLines changed: 11 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
309 | 309 |
| |
310 | 310 |
| |
311 | 311 |
| |
312 |
| - | |
313 |
| - | |
314 |
| - | |
| 312 | + | |
315 | 313 |
| |
316 | 314 |
| |
317 | 315 |
| |
| |||
604 | 602 |
| |
605 | 603 |
| |
606 | 604 |
| |
| 605 | + | |
607 | 606 |
| |
608 | 607 |
| |
609 | 608 |
| |
610 |
| - | |
611 |
| - | |
612 |
| - | |
613 | 609 |
| |
614 | 610 |
| |
615 | 611 |
| |
616 | 612 |
| |
617 | 613 |
| |
618 | 614 |
| |
| 615 | + | |
| 616 | + | |
619 | 617 |
| |
620 | 618 |
| |
621 | 619 |
| |
| |||
742 | 740 |
| |
743 | 741 |
| |
744 | 742 |
| |
745 |
| - | |
746 |
| - | |
747 |
| - | |
748 |
| - | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
749 | 747 |
| |
750 | 748 |
| |
751 | 749 |
| |
752 | 750 |
| |
753 | 751 |
| |
754 |
| - | |
755 |
| - | |
756 |
| - | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
757 | 755 |
| |
758 | 756 |
| |
759 | 757 |
| |
|
0 commit comments
Comments
(0)