xmin horizon (OldestXmin)
Also called: OldestXmin, removal horizon, vacuum horizon
The xmin horizon is the age of the oldest snapshot still alive anywhere in the system. PostgreSQL is only allowed to remove a dead row version if it is older than this line, because any transaction newer than the horizon might still need to see it.
What this means
The age of the oldest snapshot still open anywhere in the system, a line in the sand. Postgres may only delete a dead row version if it's older than this line, because any transaction older than the horizon might still need to read it. One long-running transaction drags the horizon back and stalls cleanup everywhere.
Why it matters operationally
This single boundary explains most bloat. One long-running query, an idle-in-transaction session, a stale replication slot, or a standby with feedback enabled can hold the horizon back, and then neither pruning nor VACUUM can clean up anywhere in the database. Find the holder with backend_xmin in pg_stat_activity.