Cross-posted from my blog. The original, with any updates, lives on fabwaseem.com .
If you already run Postgres, you can push realtime events to your app without adding Redis: NOTIFY sends a message on commit, and every connection that ran LISTEN gets it. I measured Postgres 18 LISTEN/NOTIFY against Redis 8 Pub/Sub for delivery latency, fan-out, and the cost to the transactions that send the events. I also checked what each one does when a message is too big, when a transaction rolls back, and when a listener disconnects. The short answer: Postgres is fast enough for most realtime features, and it's the safer choice when the event describes a database write. Redis has steadier tail latency under load.
What I tested
Everything ran on one 8 vCPU / 16 GB Linux VM on October 30, 2026: PostgreSQL 18.6 ( fsync and synchronous_commit on, shared_buffers=512MB ), Redis 8.0.2 with persistence off, Node.js 22.20, pg 8.23.1 and ioredis 6.0.0. Subscribers ran in separate Node processes.…