MultiXact (1 blogmarks)

← Blogmarks

Concurrent locks and MultiXacts in Postgres

https://blog.danslimmon.com/2023/12/11/concurrent-locks-and-multixacts-in-postgres/

When multiple transactions have no exclusive locks on the same row, the database needs a way of tracking that set of transactions beyond the single xmax value that initially locks the row.

Postgres creates a MultiXact. A MultiXact essentially bundles together some set of transactions so that those transactions can all lock the same row at the same time. Instead of a transaction ID, a new MultiXact ID is written to the row’s xmax.