Glossary — in plain language

Commit log (clog / pg_xact)

Also called: clog, pg_xact, transaction commit status log

In plain English

The commit log is a small on-disk ledger (in the pg_xact/ directory) that stores, for every transaction id, just two bits of status: in progress, committed, aborted, or sub-committed. A row’s xmin/xmax say which transaction wrote it; the commit log says whether that transaction actually committed.

Why it matters

Every MVCC visibility check may need to consult the commit log to decide if a row is visible. Because that lookup is frequent, PostgreSQL caches the log in an SLRU and stamps hint bits onto tuples to avoid repeating it. The commit log is also truncated as the oldest transaction id advances, tying it to freezing and wraparound.

Was this helpful?

← Browse the full glossary