freeze: XID and multixact wraparound age
Compare instance-wide database XID/MXID ages against freeze limits and list the oldest relations in the current database.
Inspects database-wide datfrozenxid / datminmxid ages across the cluster and relation relfrozenxid / relminmxid ages in the current database. Read-only: never runs VACUUM FREEZE.
Usage
Key Options
| Option | Effect |
|---|---|
--schema name | Filter table listing to specific schema(s); database-level freeze stays instance-wide |
--all-schemas | Show all schemas in the current database (same as default table coverage; conflicts with --schema) |
--limit N | Show at most N oldest relations (default 20, 0 for unlimited; DB judgment covers all DBs) |
--json | Emit structured JSON (freeze.limits, freeze.databases, freeze.tables) |
Verdict & Reading Output
FAIL(exit=2): On 32-bit XID kernels (e.g. KES V8), database XID/MXID age reached the hard stop limit (2146483647/2147483547). Writes fail and single-user maintenance may be required.WARN(exit=1): Database age exceededautovacuum_freeze_max_ageorautovacuum_multixact_freeze_max_age; anti-wraparound autovacuum is due or blocked.UNKNOWN(exit=3): Limits, databases, or tables probes incomplete/failed (freeze.limits,freeze.databases, orfreeze.tables).- 64-bit XID note: On KES V9 64-bit XID servers, kbdiag detects
xidwidth cleanly and skips the PG12 32-bit stop limit (xid stop limit: 64-bit xid).
Example (KES V9 Primary, excerpt, COLUMNS=80)
Related Commands
kbdiag vacuum— dead tuples and autovacuum blockers in the current databasekbdiag txn— oldest running transaction or 2PC holding back freeze horizonkbdiag slots— inactive replication slots retainingxmin