Postgres LISTEN/NOTIFY does not scale
AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.
Why it matters
Postgres LISTEN/NOTIFY uses a global lock for commit ordering, so teams relying on it for event-driven actions should migrate to other triggers under heavy write loads.
Recall.ai, a company that runs meeting transcription bots, found that a long-used Postgres feature called LISTEN/NOTIFY was slowing their database down. This feature lets programs react when data changes, like a doorbell for database rows. The problem: Postgres uses one shared lock across the whole database to keep notifications in order, so many simultaneous writes slow everything down. Switching to a different way of triggering actions on data changes gave them a big speed boost.
Recall.ai, which supplies meeting transcription bots, discovered its PostgreSQL instance was being crushed by heavy concurrent writes when using the database's LISTEN/NOTIFY notification feature. The bottleneck is built into Postgres itself: a global lock keeps notification order consistent. Replacing LISTEN/NOTIFY with another mechanism for reacting to row changes delivered significant performance gains. Companies running write-heavy Postgres workloads with this feature face similar risk.
Recall.ai traced PostgreSQL performance degradation under heavy concurrent writes to LISTEN/NOTIFY. The Postgres source (src/backend/commands/async.c, around lines 940-955) shows transactions with pending notifications take a global lock against database 0, required to ensure queue entries appear in commit order. This serialises notification-heavy workloads across the entire instance. Moving off LISTEN/NOTIFY for triggering actions on row changes yielded a significant performance improvement. No benchmark figures are given.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Node graph engine that runs big diffusion models on 4GB VRAM
ComfyUI's asynchronous weight streaming lets large diffusion models run on 4GB VRAM, meaning practitioners with modest GPUs no longer need expensive hardware for local image, video and audio generation.
iCloud apps for Windows, Linux and Android, written in Rust
Skykeep gives Rust-based native iCloud apps for Windows, Linux and Android, ending the iCloud.com-browser workaround for non-Apple-device users.
An open-source video editor covering auto-captions, voice isolation and keyframes
Very little for most professionals: Concat is a free, pre-1.0 open-source video editor that makes basic auto-captions and voice isolation available on mobile and desktop without a subscription.
OpenGame: turn your local coding agent into a full-stack game studio
Developers with a local coding agent can now scaffold full playable 3D games, art, music, testing, publishing, instead of only refactoring code, opening a path from hobby coding to shippable mini-games.
A Flipper Zero CAN bus toolkit for Tesla, from $14
An open-source $14 ESP32/Flipper Zero build replicates $200+ commercial Tesla dongles at the CAN bus level, including FSD region-gate bypass and TLSSC restore, with real VIN-ban risk.