aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlogarchive.c
diff options
context:
space:
mode:
authorMelanie Plageman <melanieplageman@gmail.com>2025-06-26 14:25:45 -0400
committerMelanie Plageman <melanieplageman@gmail.com>2025-06-26 14:25:45 -0400
commit060f420a03a8d8186423e7d64302b72e01365c20 (patch)
tree5f97bbfb08b348b0514cfd738c6bd5758c9dcf72 /src/backend/access/transam/xlogarchive.c
parenta3994ec6acb27545300ce1e336e4d119d8000ba9 (diff)
downloadpostgresql-060f420a03a8d8186423e7d64302b72e01365c20.tar.gz
postgresql-060f420a03a8d8186423e7d64302b72e01365c20.zip
Simplify vacuum VM update logging counters
We can simplify the VM counters added in dc6acfd910b8 to lazy_vacuum_heap_page() and lazy_scan_new_or_empty(). We won't invoke lazy_vacuum_heap_page() unless there are dead line pointers, so we know the page can't be all-visible. In lazy_scan_new_or_empty(), we only update the VM if the page-level hint PD_ALL_VISIBLE is clear, and the VM bit cannot be set if the page level bit is clear because a subsequent page update would fail to clear the visibility map bit. Simplify the logic for determining which log counters to increment based on this knowledge. Doing so is worthwhile because the old logic was confusing and misguided. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/flat/CAAKRu_a9w_n2mwY%3DG4LjfWTvRTJtjbfvnYAKi4WjO8QXHHrA0g%40mail.gmail.com
Diffstat (limited to 'src/backend/access/transam/xlogarchive.c')
0 files changed, 0 insertions, 0 deletions