Transactions & concurrency

MultiXact (pg_multixact)

Also called: multixact id, MultiXactId, pg_multixact

When several transactions hold a shared lock on the same row at once (for example SELECT ... FOR SHARE, or foreign-key checks), a single xmax slot cannot list them all. PostgreSQL allocates a multixact, an id that stands for a set of transactions and their lock modes, and stores the membership in the pg_multixact SLRUs (offsets and members).

What this means

A single row's xmax slot has room for one transaction, so what happens when several transactions share-lock the same row at once (FOR SHARE, foreign-key checks)? Postgres allocates a multixact: one id that stands in for a whole set of transactions and their lock modes, with the membership stored off in the pg_multixact logs.

Why it matters operationally

Workloads heavy in row-share locking or foreign keys generate many multixacts, which pressures the multixact SLRUs and grows on disk. Multixacts have their own 32-bit id space, so they carry their own wraparound risk and trigger autovacuum freezing independently of ordinary transaction ids.

← All glossary terms · GUC reference · Error catalog