select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

CONFIGURATION / VACUUMING

vacuum_freeze_min_age

Read PG 18 manual ↗

Specifies the cutoff age (in transactions) that VACUUM should use to decide whether to trigger freezing of pages that have an older XID.

Type
integer
Context
user
Measured default
50000000
Unit
Metadata snapshot
18

Definition PG 18 manual

Specifies the cutoff age (in transactions) that VACUUM should use to decide whether to trigger freezing of pages that have an older XID. The default is 50 million transactions. Although users can set this value anywhere from zero to one billion, VACUUM will silently limit the effective value to half the value of autovacuum_freeze_max_age, so that there is not an unreasonably short time between forced autovacuums. For more information see Section 24.1.5.

Measured default history
Version intervalDefault
9.0 – 1950000000
Analysis & operational context

Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗

How it works

Sets the minimum XID age at which VACUUM freezes tuple xmin values. It is a user-context setting, so a session can override it for manual VACUUM.

VACUUM computes an XID freeze cutoff from this age. Lower values freeze XIDs earlier and can repeat work on rows soon updated; higher values defer work. The effective value is capped at half of autovacuum_freeze_max_age.

Track age(relfrozenxid) for tables and age(datfrozenxid) for every database. Interpret this lower cutoff with vacuum_freeze_table_age, autovacuum_freeze_max_age, and vacuum_failsafe_age; the separate vacuum_multixact_freeze_min_age controls MXIDs.

Operational considerations

Describing the cutoff as an MXID control; MultiXacts use vacuum_multixact_freeze_min_age.

Converting XID age to time without the measured transaction rate.

Raising the value so far that routine vacuum loses useful headroom before anti-wraparound work.

Ignoring per-table autovacuum_freeze_min_age overrides.

Workload guidance

OLAP: For append-mostly or static partitions, a lower value during planned VACUUM can freeze XIDs earlier and reduce later aggressive work; verify the extra WAL and scan cost.

OLTP: Keep enough distance below autovacuum_freeze_max_age for routine vacuums to advance relfrozenxid. Tune from peak XID consumption and measured vacuum completion, not days on a calendar.

SMALL: Keep the upstream default unless XID-age evidence justifies a change. Small databases still share the cluster transaction counter and need every database monitored.

Version history 7
  1. PG 17 → 18changed
  2. PG 16 → 17changed
  3. PG 15 → 16changed
  4. PG 13 → 14changed
  5. PG 9.5 → 9.6changed
  6. PG 9.3 → 9.4changed
  7. PG 9.1 → 9.2changed

Related entries

Further reading

Definition snapshot: english-manuals:cbd318899fd34e0419904bad68a… · English manual source