PostgreSQL

Long-running or idle transactions prevent transaction ID freezing

warning
Resource ContentionUpdated Feb 13, 2026
Technologies:
How to detect:

Long-running transactions or idle transactions holding old snapshots prevent autovacuum from advancing relfrozenxid. Freezing cannot progress past oldest active transaction snapshot, causing transaction ID age to continue increasing.

Recommended action:

During wraparound recovery, identify and terminate long-running or idle transactions: pg_stat_activity for transactions with old xact_start. Set statement_timeout and idle_in_transaction_session_timeout to prevent unbounded transactions. Monitor postgresql.activity.xact_start_age.