PostgreSQL LISTEN and NOTIFY has long suffered from a reputation that it cannot scale in production. The primary villain is typically the engine global lock, which causes contention under heavy write traffic.
The team at DBOS demonstrated that this limitation is often misunderstood. By structuring event streams directly into a dedicated table and decoupling notification payloads, they achieved sixty thousand writes per second on a single database instance while maintaining millisecond-level delivery latency.
Polling tables introduces a vicious dilemma: high polling intervals create intolerable lag for interactive applications, whereas aggressive polling overwhelms database connections. Using LISTEN and NOTIFY allows consumer processes to block efficiently and wake immediately upon row insertion without polling overhead.
With the right write batching and lock management patterns, you do not need an external message broker for lightweight streaming workloads.
