Core conceptsadvanced

Transaction ID wraparound

PostgreSQL numbers transactions with a 32-bit counter; if very old rows are never frozen, the counter can appear to wrap and hide committed data. Vacuum freezing prevents it.

What this means

Postgres stamps every transaction with a number from a counter only 32 bits wide, so it eventually runs out and rolls back to the start, like a clock hand coming around again. If very old rows were never "frozen" first, that wrap can make committed data look like it belongs to the future and disappear from view. Vacuum freezing is what stops the clock lapping itself.

Why it matters operationally

Wraparound is one of the few conditions that can force PostgreSQL into a protective read-only state, a genuine outage risk on neglected databases.

Related errors

Where it lives in the source

src/backend/access/transam/varsup.c

← All glossary terms · GUC reference · Error catalog