PostgreSQL's LISTEN/NOTIFY feature causes severe performance bottlenecks under high write concurrency due to a global database lock acquired during transaction commits. When NOTIFY is used, all commits become serialized, leading to database stalls despite low CPU and I/O usage. The issue was discovered through production outages at a company processing millions of meeting recordings with thousands of concurrent writers. Load testing confirmed that removing LISTEN/NOTIFY eliminated the bottleneck and restored full database performance. The solution involved migrating to HTTP-based notifications instead of the database-level pub/sub mechanism.
Sort: