AutovacuumRestart requireddefault 200000000
autovacuum_freeze_max_age
Age at which to autovacuum a table to prevent transaction ID wraparound.
How you change it
Restart required
Defaults and ranges on this page were read from pg_settings on live PostgreSQL 18.4. Treat older majors as needing their own check before you copy a value.
What this means
The transaction age at which PostgreSQL forces an anti-wraparound autovacuum on a table, even if it is otherwise below vacuum thresholds. It is the backstop that prevents transaction-id wraparound. Lower values freeze earlier and more often; higher values defer freezing but shrink the safety margin.
When it matters
Leave near the default unless you fully understand wraparound; if you raise it, monitor datfrozenxid age closely.
| Default | 200000000 |
|---|---|
| Range | 100000 – 2000000000 |
| Type | integer |
| Change scope | Restart required |
| Category | Autovacuum |
Check the current value
SHOW autovacuum_freeze_max_age;Tradeoffs
- • Too high: less frequent freezing but a smaller margin before a forced, disruptive wraparound vacuum.
- • Anti-wraparound vacuums can be heavy and are not cancellable the way ordinary autovacuum is.
- • Monitor age(relfrozenxid) so freezing never sneaks up on you.