Avoid Angering the PostgreSQL Elder Gods
One of the most important administrative tasks for a PostgreSQL DBA is keeping an eye out for Transaction ID Exhaustion, more commonly known as "Wraparound". Like the Lovecraftian elder gods, most users will rarely, if ever, encounter it. But if you do, it's going to be a bad time. This metric is one of the most critical to monitor for since not accounting for it can lead to a full shutdown of the database for extended maintenance periods. Unfortunately it is something you may not run into until your production systems have been running for years and it's no longer easy to have long outages.
This talk will briefly go over the concept of transaction IDs, but will mostly be concentrating on monitoring for the exhaustion event and actions to take to prevent it. Since this activity is tightly tied to the tuning of autovacuum, it also has a direct relation to methods that can help prevent the awakening of another sleeping giant, table and index bloat. Keeping bloat under control is critical to peak query performance and maximizing the use of available storage.