On Wed, Aug 3, 2022 at 1:34 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > That doesn't seem like it'd be all that thorough: we expect VACUUM > to skip pages whenever possible. I'm also a bit concerned about > the expense, though admittedly this test is ridiculously expensive > already.
I bet the SKIP_PAGES_THRESHOLD stuff will be enough to make VACUUM visit every heap page in practice for a test case like this. That is all it takes to be able to safely advance relfrozenxid to whatever the oldest extant XID happened to be. However, I'm no fan of the SKIP_PAGES_THRESHOLD behavior, and already have plans to get rid of it -- so I wouldn't rely on that continuing to be true forever. It's probably not really necessary to have that kind of coverage in this particular test case. VACUUM will complain about weird relfrozenxid values in a large variety of contexts, even without assertions enabled. Mostly I was just saying: if we really do need test coverage of relfrozenxid in this context, then VACUUM is probably the way to go. -- Peter Geoghegan