WeSearch

Postgres LISTEN/NOTIFY actually scales

·5 min read · 0 reactions · 0 comments · 7 views
#postgres#listen#notify#actually#scales
Postgres LISTEN/NOTIFY actually scales
TL;DR · WeSearch summary

Postgres LISTEN/NOTIFY has a bad reputation thanks in part to a popular blog post asserting it does not scale. If that were true, it would be a shame, because LISTEN/NOTIFY is a powerful tool, allowing you to use your Postgres database for low-latency durable notifications, streams, and pub/sub. The accusations aren’t wrong: NOTIFY has unintuitive and undocumented performance characteristics arising from its use of a global lock.

Key facts
About this source

Hacker News (Front Page) files mainly under programming. We currently carry 550 of its stories. Top-voted stories on Hacker News.

Original article
Dbos
Read full at Dbos →
Opening excerpt (first ~120 words) tap to expand

Postgres LISTEN/NOTIFY has a bad reputation thanks in part to a popular blog post asserting it does not scale. If that were true, it would be a shame, because LISTEN/NOTIFY is a powerful tool, allowing you to use your Postgres database for low-latency durable notifications, streams, and pub/sub. The accusations aren’t wrong: NOTIFY has unintuitive and undocumented performance characteristics arising from its use of a global lock. But “unintuitive behavior” is not the same as “not scalable.” In this blog post, we’ll show how we optimized LISTEN/NOTIFY-backed streams at scale, achieving 60K writes per second on a single Postgres server with millisecond-scale latency.Low-Latency Streaming with LISTEN/NOTIFYThe basic design of Postgres-backed streams is simple: create a streams table where…

Excerpt limited to ~120 words for fair-use compliance. The full article is at Dbos.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from Dbos