Postgres Queues Actually Scale

This article explains how to optimize Postgres-backed queues to handle high-volume workloads by using locking clauses. It addresses the common misconception that Postgres cannot scale for queueing systems by demonstrating techniques to prevent contention among concurrent workers.
Why it matters
It provides a practical engineering solution for developers to scale infrastructure without needing to introduce additional, complex queueing systems like RabbitMQ or Redis.
Back to insights Postgres Queues Actually Scale Qian Li Peter Kraft June 2, 2026 How To The conventional wisdom around Postgres-backed queues is that they don't scale. To handle a large workload, you can't use Postgres, but instead need a dedicated queueing system like RabbitMQ + Celery or Redis + BullMQ. There's a reason people say this: queues really are a demanding workload for Postgres. At scale, thousands of workers are polling your queues table at the same time, creating contention and churning indexes. But with the right optimizations, Postgres can handle it. In this blog post, we'll show how we optimized Postgres-backed queues at scale, achieving 30K workflow executions per second across thousands of servers.
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in