On Wed, Apr 13, 2022 at 4:13 PM Andres Freund <and...@anarazel.de> wrote: > IIRC the problem in matter isn't skipped pages, but that the horizon simply > isn't new enough to mark pages as all visible.
Sometimes OldestXmin can go backwards in VACUUM operations that are run in close succession against the same table, due to activity from other databases in the same cluster (perhaps other factors are involved at times). That's why the following assertion that I recently added to vacuumlazy.c will fail pretty quickly without the "vacrel->NewRelfrozenXid == OldestXmin" part of its test: Assert(vacrel->NewRelfrozenXid == OldestXmin || TransactionIdPrecedesOrEquals(aggressive ? FreezeLimit : vacrel->relfrozenxid, vacrel->NewRelfrozenXid)); If you remove "vacrel->NewRelfrozenXid == OldestXmin", and run the regression tests, the remaining assertion will fail quite easily. Though perhaps not with a serial "make check". -- Peter Geoghegan