Re: Confine vacuum skip logic to lazy_scan_skip - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Confine vacuum skip logic to lazy_scan_skip
Date
Msg-id CAH2-Wzn==tgSPr7hdgLx788rukETPVPvEOzecPsAQwjFFf3wJA@mail.gmail.com
Whole thread Raw
In response to Re: Confine vacuum skip logic to lazy_scan_skip  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Confine vacuum skip logic to lazy_scan_skip
List pgsql-hackers
On Fri, Mar 8, 2024 at 8:49 AM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> ISTM we should revert the above hunk, and backpatch it to v16. I'm a
> little wary because I don't understand why that change was made in the
> first place, though. I think it was just an ill-advised attempt at
> tidying up the code as part of the larger commit, but I'm not sure.
> Peter, do you remember?

I think that it makes sense to set the VM when indicated by
lazy_scan_prune, independent of what either the visibility map or the
page's PD_ALL_VISIBLE marking say. The whole point of
DISABLE_PAGE_SKIPPING is to deal with VM corruption, after all.

In retrospect I didn't handle this particular aspect very well in
commit 980ae17310. The approach I took is a bit crude (and in any case
slightly wrong in that it is inconsistent in how it handles the last
page). But it has the merit of fixing the case where we just have the
VM's all-frozen bit set for a given block (not the all-visible bit
set) -- which is always wrong. There was good reason to be concerned
about that possibility when 980ae17310 went in.

--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Identify transactions causing highest wal generation
Next
From: Jelte Fennema-Nio
Date:
Subject: Re: Support a wildcard in backtrace_functions