There are some aspects of VACUUM whose reason to exist is complex to explain, and occasionally they have negative behavior. Let's look more deeply at those, and find some solutions.
Avoiding auto-freezing and page corruptions
How to do it...
PostgreSQL uses internal transaction identifiers that are 4 bytes long, so we only have 232 transaction IDs (about four billion). PostgreSQL starts again from the beginning when that wraps around, allocating new identifiers in a circular manner. The reason we do this is that moving to an 8-byte identifier has various other negative effects and costs that we would rather not pay, so we keep the 4-byte transaction identifier, which means we need to do regular sweeps to replace old transaction...