Autovacuum triggering

If any database is in danger of overflowing the maximum allowed transaction ID, autovacuum will first work on that situation. autovacuum will kick in to work on XID wraparound even if you've disabled it. It looks at the transaction age, a measure of how many transactions have happened since a database was last reset to use a new XID basis.

You can monitor the highest age on any database and see them for individual databases or tables using queries such as the following:

SELECT max(age(datfrozenxid)) FROM pg_database; 
SELECT datname,age(datfrozenxid) from pg_database ORDER BY age(datfrozenxid) DESC; 
SELECT relname, age(relfrozenxid) FROM pg_class WHERE relkind = 'r' ORDER BY age(relfrozenxid) DESC; 

Once that check is ...

Get PostgreSQL 10 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.