autovacuum_freeze_max_age
Fact — official short description: “Age at which to autovacuum a table to prevent transaction ID wraparound.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | 200000000 |
— | 200000000 |
How it works
Age at which to autovacuum a table to prevent transaction ID wraparound. The value is fixed when the server starts, so changing it requires a restart.
Reaching the max age forces an aggressive autovacuum even if ordinary autovacuum is disabled; a per-table override can only lower the global ceiling. Safety must be assessed across every database/table age together with long transactions and replication slots.
Monitor and change autovacuum_freeze_max_age together with vacuum_freeze_min_age, vacuum_freeze_table_age, vacuum_failsafe_age. Validate on the relevant server role and real workload, then use its postmaster context to choose session change, reload, or restart; a historical boot default is not the current effective value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | Calibrate autovacuum_freeze_max_age against the oldest XID/MXID age in every database and measured vacuum completion rate. Remove long transactions, stale slots, and blocked workers; never raise ages merely to hide a backlog. |
| OLAP | Proactively VACUUM (FREEZE) newly loaded or static partitions in batch windows and reserve I/O time for full scans. Convert age budgets using peak transaction rate, not a wall-clock guess. |
| Small nodes | Upstream defaults are usually safest. A small system still needs anti-wraparound maintenance; monitor every database, not only the application database. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | 1000000000 |
different | 1000000000 |
| OLAP | 1000000000 |
different | 1000000000 |
| CRIT | 1000000000 |
different | 1000000000 |
| TINY | 1000000000 |
different | 1000000000 |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 = 1000000000 (dcs); OLAP: PG9.0–19 Beta 3 = 1000000000 (dcs); CRIT: PG9.0–19 Beta 3 = 1000000000 (dcs); TINY: PG9.0–19 Beta 3 = 1000000000 (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to reduce forced anti-wraparound vacuum frequency by accepting a larger XID-age operating window; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.
Common pitfalls
- Converting transaction age to days without using the actual transaction rate.
- Raising the ceiling to hide blocked or underprovisioned vacuum.
- Monitoring only the current database instead of every database and table.
- Changing the global value while a table storage parameter overrides it.
- Treating reltuples and cumulative change statistics as exact real-time counts.
Related parameters
vacuum_freeze_min_age · vacuum_freeze_table_age · vacuum_failsafe_age · autovacuum_multixact_freeze_max_age · vacuum_multixact_freeze_min_age · vacuum_multixact_freeze_table_age
References
- PostgreSQL 19 Beta 3 — autovacuum_freeze_max_age
- PostgreSQL 19 release notes
- Machine-readable GUC export