Re: Intermittent buildfarm failures on wrasse
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Andres Freund <andres@anarazel.de>, David Rowley <dgrowleyml@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-04-13T23:38:06Z
Lists: pgsql-hackers
Peter Geoghegan <pg@bowt.ie> writes: > On Wed, Apr 13, 2022 at 4:13 PM Andres Freund <andres@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). I've been doing some testing locally by inserting commands to manually set tenk1's relallvisible to zero. I first did that in test_setup.sql ... and it had no effect whatsoever. Further experimentation showed that the "CREATE INDEX ON tenk1" steps in create_index.sql itself generally suffice to fix relallvisible; although if you force it back to zero after the last such command, you get the same plan diffs wrasse is showing. And you don't get any others, which I thought curious until I realized that sanity_check.sql's database-wide VACUUM offers yet another opportunity to heal the incorrect value. If you force it back to zero again after that, a bunch of later tests start to show plan differences, which is what I'd been expecting. 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. Which is odd in itself because not that much time elapses between create_index and sanity_check, certainly less than the time from test_setup to create_index. 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. And we still lack an explanation of why this only now broke. I remain suspicious that pgstats is behaving unexpectedly. regards, tom lane
Commits
-
Repurpose PROC_COPYABLE_FLAGS as PROC_XMIN_FLAGS
- 8d9d1286acf9 14.4 landed
- 8d061acd12af 15.0 landed
- 5fd0cccc116b 13.8 landed
-
Tighten ComputeXidHorizons' handling of walsenders.
- 6fea65508a1a 15.0 landed
-
Adjust VACUUM's removable cutoff log message.
- 357c8455e649 15.0 landed
-
Temporarily add some probes of tenk1's relallvisible in create_index.sql.
- 5bb2b6abc8d6 15.0 landed
-
Set synchronous_commit=on in test_setup.sql.
- 02fea8fdda65 15.0 cited
-
Rearrange core regression tests to reduce cross-script dependencies.
- cc50080a828d 15.0 cited
-
snapshot scalability: Don't compute global horizons while building snapshots.
- dc7420c2c927 14.0 cited