PostgreSQL Postmaster Contention: How Meeting Synchronization Creates Database Bottlenecks at Scale
By
davidgu
3mo ago· 8 min readenInsight
100/100
Golden Brown
Bagelometer↗
The kind of bagel that ruins lesser bagels for you.
Score100TypeanalysisSentimentneutral
Summary
The article discusses a production issue at Recall.ai related to PostgreSQL postmaster contention that emerges at scale due to the synchronized nature of meeting start times. Most meetings start on the hour or half-hour, creating sudden spikes in database connections that overwhelm the postmaster process. The postmaster, which handles connection requests, becomes a bottleneck when thousands of connections arrive simultaneously, causing connection timeouts and degraded performance. The article explains the underlying architecture of PostgreSQL's connection handling and how this synchronization problem manifests in real-world applications processing millions of meetings weekly.
Key quotes
· 5 pulledMost meetings start on the hour, some on the half, but most on the full.
Processing TB/s of real-time media streams is the thing we get asked most about.
However an often-overlooked feature of meetings is their unusual synchronization.
The implication of this has rippled through our infrastructure in unexpected ways.
Postmaster contention emerges as a critical bottleneck when thousands of connections arrive simultaneously.
Learn more about an often-overlooked bottleneck in scaled postgres systems: postmaster contention. This deep dive into a production issue highlights how this surfaces and explains the underlying causes.
