# vacuum_failsafe_age

> vacuum_failsafe_age sets the age at which VACUUM should trigger failsafe to avoid a wraparound outage. It is a user setting present in PG14–18; the latest recorded boot default is 1600000000.
---

> [!NOTE]
> **Fact — official short description:** “Age at which VACUUM should trigger failsafe to avoid a wraparound outage.”

## Identity {#identity}

| Field | Value | Meaning |
| --- | --- | --- |
| Type | `integer` | Upstream pg_settings type |
| Context | `user` | Settable by an ordinary user |
| Unit | — | Raw unit |
| Range | `0` – `2100000000` | Raw limits in the last observed version |
| Enum values | — | — for non-enum types |
| Category | Vacuuming / Freezing | Upstream classification |
| Latest boot value | `1600000000` | 1600000000 |
{.fields meta="-"}

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG14 |
| Present in | PG14–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`1e55e7d1755c`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=1e55e7d1755cefbb44982fbacc7da461fa8684e6) — Add wraparound failsafe to VACUUM. |
| Commit date | 2021-04-07 |
| Discussion | [thread 1](https://postgr.es/m/CAD21AoD0SkE11fMw4jD4RENAwBMcw1wasVnwpJVw3tVqPOQgAw@mail.gmail.com) · [thread 2](https://postgr.es/m/CAH2-WzmgH3ySGYeC-m-eOBsa2=sDwa292-CFghV4rESYo39FsQ@mail.gmail.com) |

## Default history {#default-history}

| Versions | Raw `boot_val` | Unit | Human value |
| --- | --- | --- | --- |
| PG14–19 Beta 3 | `1600000000` | — | 1600000000 |
{.full-width caption="Measured PG9.0–19 Beta 3 boot defaults"}

## How it works {#mechanism}

Age at which VACUUM should trigger failsafe to avoid a wraparound outage. It can be changed at session scope, so different sessions may observe different behavior.

At the failsafe age, a running VACUUM prioritizes advancing the freeze horizon quickly: cost delays stop and optional work such as index cleanup and tail truncation is skipped. This is a last defense against wraparound outage, not a routine performance mode.

Monitor and change vacuum_failsafe_age together with autovacuum_freeze_max_age, vacuum_freeze_min_age, vacuum_freeze_table_age. Validate on the relevant server role and real workload, then use its user context to choose session change, reload, or restart; a historical boot default is not the current effective value.

## Tuning advice {#tuning-advice}

> [!TIP]
> **Advice.** These are workload-specific starting points and must be validated with measurements.

| Workload | Guidance |
| --- | --- |
| OLTP | Calibrate vacuum_failsafe_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. |
{.full-width}

## Pigsty {#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 | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
{.full-width}

> [!CAUTION]
> **Advice — pending human review.** Fact from the current Pigsty template projection: OLTP: PG14–19 Beta 3 unmodified; OLAP: PG14–19 Beta 3 unmodified; CRIT: PG14–19 Beta 3 unmodified; TINY: PG14–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- Treating failsafe as a normal high-throughput VACUUM mode.
- Ignoring skipped index cleanup after the emergency has passed.
- Raising the age to suppress evidence of a maintenance failure.
- Changing the global value while a table storage parameter overrides it.
- Treating reltuples and cumulative change statistics as exact real-time counts.

## Related parameters {#related-parameters}

[`autovacuum_freeze_max_age`](/parameters/autovacuum-freeze-max-age/) · [`vacuum_freeze_min_age`](/parameters/vacuum-freeze-min-age/) · [`vacuum_freeze_table_age`](/parameters/vacuum-freeze-table-age/) · [`autovacuum_multixact_freeze_max_age`](/parameters/autovacuum-multixact-freeze-max-age/) · [`vacuum_multixact_freeze_min_age`](/parameters/vacuum-multixact-freeze-min-age/) · [`vacuum_multixact_freeze_table_age`](/parameters/vacuum-multixact-freeze-table-age/)

## References {#references}

- [PostgreSQL 19 Beta 3 — vacuum_failsafe_age](https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-VACUUM-FAILSAFE-AGE)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
