/explain/relfrozenxid

relfrozenxid

Every table carries relfrozenxid in pg_class: a promise that no unfrozen row older than this xid exists in the table. Vacuum advances it when it can prove the promise for a newer xid, and age(relfrozenxid) (how far the promise lags the current xid) is the single number wraparound monitoring watches. The three freeze settings are all expressed against this age.

DEMO — xid age over 365 d, toy tablesame chart system as the report
2,147,483,647 (wraparound)freeze_max_age = 200,000,000
day 090180270365
autovacuum_freeze_max_age200,000,000
default 200,000,000 · max 2,000,000,000
xid consumption40.00 M/day
transactions per day, 1 M → 400 M
AGGRESSIVE VACUUM EVERY
5.0 d
RUNS PER YEAR
73.0
MARGIN TO SHUTDOWN
48.7 d
SEE ALSO
freezeautovacuum_freeze_max_agewraparound← back to start
Databases carry the same idea as datfrozenxid, the max over their tables. Alert around age 500M-1B; the hard limit is ~2.1B.
relfrozenxid — robovac