Hi!
Suppose the databases on my instance are near to have a wraparound failure.
Is this actually the case, or are you just afraid?
(I think so, from what I see, but in the PostgreSQL log I haven't seen any warning about It yet).
What do I have to do?
vacuum freeze;
Kinda, but really... Heck No!!!
vacuum --freeze --jobs=`nproc` --dbname=your_db_name
That will VACUUM FREEZE every table in your database in multiple threads.
However, you only need to freeze tables getting near wraparound. pg_class.relfrozenxid tells you which tables to worry about.
better than,
vacuum analyze;
VACUUM ANALYZE does a plain vacuum plus collects statistics for the query analyzer. Collecting query stats has nothing to do with vacuuming or protecting against wraparound.
Or both?
If the autovacuum_freeze configuration parameters have defaults values, should I modify any first?
What version are you running? Even the recently EOL versions protect from wraparound (though it's a painful last-ditch process).
--
Angular momentum makes the world go 'round.
Angular momentum makes the world go 'round.