Postgres WAL Lock Bottleneck

A database incident revealed that when storage slows down, Postgres WAL writes can cause thousands of backends to queue up behind a single exclusive lock, while read operations remain relatively unaffected. This occurs because WAL flushes hold the lock across the fsync operation, whereas reads drop their locks before hitting the disk, meaning a slow disk can trigger a catastrophic lock contention event rather than just aslowdown.