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: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-01-02T18:31:51Z
Lists: pgsql-hackers

Attachments

On Sat, Dec 31, 2022 at 4:53 PM Peter Geoghegan <pg@bowt.ie> wrote:
> The first patch makes sure that the snapshotConflictHorizon cutoff
> (XID cutoff for recovery conflicts) is never a special XID, unless
> that XID is InvalidTransactionId, which is interpreted as a
> snapshotConflictHorizon value that will never need a recovery conflict
> (per the general convention for snapshotConflictHorizon values
> explained above ResolveRecoveryConflictWithSnapshot).

Pushed this just now.

Attached is another very simple refactoring patch for vacuumlazy.c. It
makes vacuumlazy.c save the result of get_database_name() in vacrel,
which matches what we already do with things like
get_namespace_name().

Would be helpful if I could get a +1 on
v1-0002-Never-just-set-the-all-frozen-bit-in-VM.patch, which is
somewhat more substantial than the others.

-- 
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.