
The Problem With Postgres Pub/Sub at Scale
Postgres LISTEN/NOTIFY is a simple, powerful feature that developers use for cache invalidation, job queues, and real-time updates. But it has a scaling problem: the more clients listening, the slower every notification becomes. At thousands of concurrent listeners, latency degrades by orders of magnitude.
Supabase has introduced Multigres as a solution. The system keeps notification latency flat regardless of listener count, preserving the same pub/sub workflow developers already rely on.
How Multigres Works
Multigres acts as an operating system layer for Postgres, distributing LISTEN/NOTIFY operations across multiple database instances while maintaining a single logical interface. When a client subscribes to a channel, Multigres routes the connection to an appropriate instance based on current load. Notifications published to a channel are then propagated across all instances hosting listeners for that channel.
The result is consistent performance whether you have 10 listeners or 10,000. Traditional single-instance Postgres degrades predictably as listener count increases because each NOTIFY operation must traverse the entire listener list. Multigres breaks this pattern by partitioning listeners across multiple databases.
Real-World Use Cases
Supabase uses Postgres pub/sub internally for several critical workflows:
- Cache invalidation: When data changes, NOTIFY triggers cache updates across application servers
- Job queues: Background workers listen for new tasks without polling the database
- Real-time fan-out: User updates broadcast to all connected clients instantly
These patterns are common in modern applications but hit performance walls under high concurrency. Multigres removes that ceiling.
Under the Hood
Supabase published a technical write-up explaining the architecture. The system builds on work from Vitess, the MySQL sharding layer, but adapts the concepts for Postgres multi-tenancy. Each Postgres instance in the cluster maintains its own listener set, and a coordination layer ensures that published messages reach all relevant instances.
The approach differs from traditional pub/sub message brokers like Redis or RabbitMQ because it stays within the Postgres ecosystem. Developers don't need to introduce new infrastructure or learn different APIs. If your application already uses LISTEN/NOTIFY, Multigres is a drop-in performance upgrade.
Availability and Next Steps
Multigres is currently in alpha as version 0.1. Supabase has been testing it internally and plans to make it available to platform users in future releases. The announcement on LinkedIn signals a shift toward making Postgres scale horizontally for workloads that previously required external message queues.
For developers building real-time features on Postgres, this addresses a long-standing limitation. As Supabase continues expanding its platform capabilities, keeping latency predictable at scale becomes essential for applications serving thousands of concurrent users.
Sources
1 checkedHow we cover tool news: Create With's tool desk drafts these reports with AI from the sources listed above and checks them against those sources before publishing.








