pg_frozen
pg_frozen · Exposes a frozen(tid) function that explains if a tuple has been frozen
Overview
Usage
Sources:
pg_frozen exposes a low-level diagnostic that inspects a heap tuple header and reports whether its inserting transaction ID has been frozen. It is useful for narrow VACUUM experiments, not as a durable tuple property or a substitute for PostgreSQL’s vacuum statistics.
Core Workflow
A visible tuple normally reports 0 before freezing and 1 after its header is marked frozen.
Object Index
frozen(tableoid oid, tid tid) RETURNS integerfetches the physical tuple identified by relation OID andctid; it returns the header’s frozen flag, or3when the tuple cannot be fetched.
Operational Notes
Version 0.0.1 is relocatable and declares no dependency or preload requirement. The function is STRICT and PARALLEL SAFE, but it reads physical heap state through PostgreSQL internals.
Always derive tableoid and ctid from the same current row in one statement. A ctid is not a stable identifier: UPDATE, VACUUM, pruning, and concurrent activity can replace or remove the referenced tuple. The extension uses SnapshotAny, so its result is an implementation-level observation that can include tuples outside normal MVCC visibility. Keep it out of application logic and test it against the exact PostgreSQL major in use.