postgresql/src
Melanie Plageman 060f420a03 Simplify vacuum VM update logging counters
We can simplify the VM counters added in dc6acfd910 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
2025-06-26 14:25:45 -04:00
..
backend Simplify vacuum VM update logging counters 2025-06-26 14:25:45 -04:00
bin pg_dump: include comments on valid not-null constraints, too 2025-06-26 18:24:12 +02:00
common Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays 2025-05-08 22:01:25 +03:00
fe_utils Fix incorrect format placeholders 2025-04-25 16:49:30 +02:00
include Restrict virtual columns to use built-in functions and types 2025-06-25 09:56:49 +02:00
interfaces Fix allocation check to test the right variable 2025-06-17 22:42:38 +02:00
makefiles pgxs.mk: remove unreachable rule for deleting regress.def. 2025-06-20 12:12:29 -04:00
pl Sync typedefs.list with the buildfarm. 2025-06-15 13:04:24 -04:00
port Properly fix AVX-512 CRC calculation bug 2025-06-23 18:03:56 +07:00
template thread-safety: gmtime_r(), localtime_r() 2024-08-23 07:43:04 +02:00
test pg_dump: include comments on valid not-null constraints, too 2025-06-26 18:24:12 +02:00
timezone Update time zone data files to tzdata release 2025b. 2025-04-30 11:13:49 -04:00
tools Sync typedefs.list with the buildfarm. 2025-06-15 13:04:24 -04:00
tutorial Doc: simplify the tutorial's window-function examples. 2025-01-21 14:43:21 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in oauth: Move the builtin flow into a separate module 2025-05-01 09:14:30 -07:00
Makefile.shlib Use exported symbols list on macOS for loadable modules as well 2025-06-10 07:04:43 +02:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls-global.mk Remove distprep 2023-11-06 15:18:04 +01:00