Execute Vacuum freeze before upgrade

To avoid any autovacuum to prevent wraparound during the PG 12 Upgrade, it is suggested to execute to all the tables that are candidates to execute a VACUUM FREEZE.

The autovacuum to prevent wraparound should be avoided since could require heavy I/O and even if we terminate it it will restart in seconds, since it is a mechanism to keep the database integrity.

The ideal is to execute this procedure 24 hours before the upgrade.

Acceptance criteria:

  • Add the query that should be executed and the percentage to be considered safe for 24 hours.
  • Describe step by step
Edited by Jose Finotto