# vacuum_max_eager_freeze_failure_rate

> vacuum_max_eager_freeze_failure_rate — Fraction of pages in a relation vacuum can scan and fail to freeze before disabling eager scanning. Observed in PG18–19 Beta 3; its last measured boot default is 0.03 in PG19 Beta 3, with user context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
---

> [!NOTE]
> **Fact — official short description:** “Fraction of pages in a relation vacuum can scan and fail to freeze before disabling eager scanning.”

## Identity {#identity}

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

## Lifecycle {#lifecycle}

| Fact | Value |
| --- | --- |
| First observed | PG18 |
| Present in | PG18–19 Beta 3 |
| Removed in | No |
| Introduction commit | [`052026c9b903`](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=052026c9b903380b428a4c9ba2ec90726db81288) — Eagerly scan all-visible pages to amortize aggressive vacuum |
| Commit date | 2025-02-11 |
| Discussion | [thread 1](https://postgr.es/m/flat/CAAKRu_ZF_KCzZuOrPrOqjGVe8iRVWEAJSpzMgRQs%3D5-v84cXUg%40mail.gmail.com) |

## Default history {#default-history}

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

## How it works {#mechanism}

Fraction of pages in a relation vacuum can scan and fail to freeze before disabling eager scanning. It can be changed at session scope, so different sessions may observe different behavior.

PG18 ordinary VACUUM may eagerly scan all-visible pages that are not all-frozen; it stops that extra work when the fraction scanned without successful freezing grows too high. Raising the rate can shrink later aggressive scans at the cost of more current I/O.

Monitor and change vacuum_max_eager_freeze_failure_rate together with vacuum_truncate, vacuum_freeze_table_age, autovacuum_freeze_max_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_max_eager_freeze_failure_rate 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: PG18–19 Beta 3 unmodified; OLAP: PG18–19 Beta 3 unmodified; CRIT: PG18–19 Beta 3 unmodified; TINY: PG18–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.

## Common pitfalls {#common-pitfalls}

- Treating the value as a percentage integer instead of a fraction between zero and one.
- Raising it and increasing scans of all-visible pages without measuring added I/O and WAL.
- Assuming eager freezing eliminates the need for periodic aggressive VACUUM.
- Ignoring a table-level storage-parameter override.
- Judging success only by pages scanned instead of pages actually frozen and future aggressive-scan work.

## Related parameters {#related-parameters}

[`vacuum_truncate`](/parameters/vacuum-truncate/) · [`vacuum_freeze_table_age`](/parameters/vacuum-freeze-table-age/) · [`autovacuum_freeze_max_age`](/parameters/autovacuum-freeze-max-age/) · [`maintenance_work_mem`](/parameters/maintenance-work-mem/) · [`vacuum_failsafe_age`](/parameters/vacuum-failsafe-age/) · [`vacuum_freeze_min_age`](/parameters/vacuum-freeze-min-age/)

## References {#references}

- [PostgreSQL 19 Beta 3 — vacuum_max_eager_freeze_failure_rate](https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-VACUUM-MAX-EAGER-FREEZE-FAILURE-RATE)
- [PostgreSQL 19 release notes](https://www.postgresql.org/docs/19/release-19.html)
- [Machine-readable GUC export](/data/guc.jsonl)
