Re: Fixing a couple of buglets in how VACUUM sets visibility map bits

Peter Geoghegan <pg@bowt.ie>

From: Peter Geoghegan <pg@bowt.ie>
To: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Robert Haas <robertmhaas@gmail.com>
Date: 2023-01-12T03:46:59Z
Lists: pgsql-hackers

Attachments

On Mon, Jan 9, 2023 at 12:58 PM Peter Geoghegan <pg@bowt.ie> wrote:
> On Mon, Jan 9, 2023 at 11:57 AM Andres Freund <andres@anarazel.de> wrote:
> > Afaict we'll need to backpatch this all the way?
>
> I thought that we probably wouldn't need to, at first. But I now think
> that we really have to.

Attached is v4. This is almost the same as v3. The only notable change
is in how the issue is explained in comments, and in the commit
message.

I have revised my opinion on this question once more. In light of what
has come to light about the issue from recent testing, I lean towards
a HEAD-only commit once again. What do you think?

I still hope to be able to commit this on my original timeline (on
Monday or so), without the issue taking up too much more of
everybody's time.

Thanks
-- 
Peter Geoghegan

Commits

  1. Tighten up VACUUM's approach to setting VM bits.

  2. Make lazy_vacuum_heap_rel match lazy_scan_heap.

  3. vacuumlazy.c: Tweak local variable name.

  4. vacuumlazy.c: Save get_database_name() in vacrel.

  5. Avoid special XID snapshotConflictHorizon values.

  6. Change the format of the VM fork to add a second bit per page.