postgres=# select * from sessions where video_id = 'g9yl3zE9MlI';

Vibe Hacking Postgres

· 80:32 · Storage internals

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

session summary

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

  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