postgres@hacking:~$ cat projects/multixact-standby

MultiXact standby deadlock

Fix standby MultiXact creation and deadlock/corruption edge cases.

progress

100%

next

Shipped. Watch the back branches and move on.

sessions

2
· 71:56 · youtube ↗

MultiXact stuff

Standby MultiXact creation, corruption edges, and deadlock.

The session reproduced a standby deadlock involving MultiXact lookup: a reader holds a heap buffer lock while waiting for a not-yet-replayed MultiXact offset, and the startup process needs that buffer before it can supply the offset. The team demonstrated the hang on Postgres 13 and current branches, confirmed that SIGINT cannot break it, evaluated three unsafe fixes, then implemented a localized WAL-redo fix that pre-populates the next offset on the same SLRU page.

[timecodes · 8]
  1. Follow-up fixes for pg_dump policy comments
  2. MultiXacts and the standby deadlock report
  3. How MultiXact offsets and members are stored
  4. Circular wait between a reader and startup process
  5. Building a deterministic reproduction
  6. Debugging both sides of the deadlock
  7. Why three obvious fixes are unsafe
  8. Localized WAL-redo fix and successful test
committed

direct mapping
· 80:32 · youtube ↗

Vibe Hacking Postgres

Generic workshop near the start of the MultiXact standby-deadlock thread.

Responding to audience interest in locking, the group investigated a Postgres 17 standby hang introduced when a one-millisecond MultiXact polling sleep was replaced with condition variables. A reported workload could drive replica TPS to zero. They reconstructed the locking protocol, used AI to inspect the patch and report, and realized the likely failure is a true deadlock: a query waits for MultiXact replay while holding the heap page needed by startup. They planned timeout instrumentation and stronger diagnostics.

[timecodes · 8]
  1. Audience chooses locking as the topic
  2. MultiXact basics and foreign-key locking
  3. SLRU storage and the old polling sleep
  4. Condition-variable optimization in Postgres 17
  5. Replica TPS drops to zero in the reported workload
  6. Why standby replay changes the concurrency model
  7. Timeout workaround versus a real fix
  8. Identifying the heap-page deadlock
committed

correlated mapping