aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/windowfuncs.c
diff options
context:
space:
mode:
authorMasahiko Sawada <msawada@postgresql.org>2024-05-01 12:34:04 +0900
committerMasahiko Sawada <msawada@postgresql.org>2024-05-01 12:34:04 +0900
commitf199436c12819d2c01b72eaa6429de0ca5838471 (patch)
tree5e4268f6f44e1b3a36d369e59b289ae35dff4d1c /src/backend/utils/adt/windowfuncs.c
parent68d358545037c51723a7ff0ab96f489e066a6fdd (diff)
downloadpostgresql-f199436c12819d2c01b72eaa6429de0ca5838471.tar.gz
postgresql-f199436c12819d2c01b72eaa6429de0ca5838471.zip
Fix parallel vacuum buffer usage reporting.
A parallel worker's buffer usage is accumulated to its pgBufferUsage and then is accumulated into the leader's one at the end of the parallel vacuum. However, since the leader process used to use dedicated VacuumPage{Hit, Miss, Dirty} globals for the buffer usage reporting, the worker's buffer usage was not included, leading to an incorrect buffer usage report. To fix the problem, this commit makes vacuum use pgBufferUsage instruments for buffer usage reporting instead of VacuumPage{Hit, Miss, Dirty} globals. These global variables are still used by ANALYZE command and autoanalyze. This also fixes the buffer usage report of vacuuming on temporary tables, since the buffers dirtied by MarkLocalBufferDirty() were not tracked by the VacuumPageDirty variable. Parallel vacuum was introduced in 13, but the buffer usage reporting for VACUUM command with the VERBOSE option was implemented in 15. So backpatch to 15. Reported-by: Anthonin Bonnefoy Author: Anthonin Bonnefoy Reviewed-by: Alena Rybakina, Masahiko Sawada Discussion: https://postgr.es/m/CAO6_XqrQk+QZQcYs_C6nk0cMfHuUWk85vT9CrcA1NffFbAVE2A@mail.gmail.com Backpatch-through: 15
Diffstat (limited to 'src/backend/utils/adt/windowfuncs.c')
0 files changed, 0 insertions, 0 deletions