On Wed, Apr 13, 2022 at 4:38 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > So what seems to be happening on wrasse is that a background > autovacuum (or really autoanalyze?) is preventing pages from > being marked all-visible not only during test_setup.sql but > also create_index.sql; but it's gone by the time sanity_check.sql > runs.
I agree that it would need to be an autoanalyze (due to the PROC_IN_VACUUM optimization). > It seems like a reliable fix might require test_setup to wait > for any background autovac to exit before it does its own > vacuums. Ick. This is hardly a new problem, really. I wonder if it's worth inventing a comprehensive solution. Some kind of infrastructure that makes VACUUM establish a next XID up-front (by calling ReadNextTransactionId()), and then find a way to run with an OldestXmin that's >= the earleir "next" XID value. If necessary by waiting. -- Peter Geoghegan