DigiNews

Tech Watch by Johan Denoyer

← Back to articles

Postgres LISTEN/NOTIFY Actually Scales

Quality: 8/10 Relevance: 9/10

Summary

The article challenges the belief that PostgreSQL LISTEN/NOTIFY cannot scale and explains the root cause of earlier bottleneck: a global exclusive lock during commit. It then describes an optimization that buffers NOTIFYs and batches them into a single transaction, plus a lightweight fallback polling, achieving up to 60K stream writes per second with 15-100 ms latency on a single Postgres server. The piece includes benchmark results and links to the GitHub repository with the benchmark code.

🚀 Service construit par Johan Denoyer