Optimize PostgreSQL AUTOVACUUM 2021
Currently our AUTOVACUUM setup is really aggressive.
We would like to monitor and evaluate if we can optimize the process.
- change the autovacuum_freeze_max_age and monitor the impact. (1 - Increase autovacuum_freeze_max_age from 200000000 to 400000000
After 2 weeks of analyzing the impact:
2 - Increase autovacuum_freeze_max_age from 400000000 to 600000000
After 2 weeks of analyzing the impact:
2 - Increase autovacuum_freeze_max_age from 600000000 to 800000000
After 2 weeks of analyzing the impact:
2 - Increase autovacuum_freeze_max_age from 800000000 to 1000000000 )
- change or monitoring to be more efficient
- create a "mechanism"( I am thinking even a CI pipeline) to execute VACUUM FREEZE when the database is idle of the tables that are 80% or 90% of start the AUTOVACUUM WRAPAROUND.