On Wed, Apr 13, 2022 at 6:05 PM Andres Freund <and...@anarazel.de> wrote: > I think most of those we've ended up replacing by using temp tables in > those tests instead, since they're not affected by the global horizon > anymore.
Maybe, but it's a pain to have to work that way. You can't do it in cases like this, because a temp table is not workable. So that's not an ideal long term solution. > > We'd not necessarily have to embed wait-for-horizon into VACUUM > > itself. > > I'm not sure it'd be quite reliable outside of vacuum though, due to the > horizon potentially going backwards (in otherwise harmless ways)? I agree, since vacuumlazy.c would need to either be given its own OldestXmin, or knowledge of a wait-up-to XID. Either way we have to make non-trivial changes to vacuumlazy.c. -- Peter Geoghegan