News

PgDog: A Postgres Connection Pooler That Doesn't Make You Rewrite Your App

PgDog is a new Postgres connection pooler that preserves SET and LISTEN/NOTIFY, so you don't have to change your application code to scale.

July 7, 2026· 2 min read· Source: PgDog
PgDog: A Postgres Connection Pooler That Doesn't Make You Rewrite Your App

PgDog is a Postgres proxy that does connection pooling — but unlike PgBouncer, RDS Proxy, or Pgpool-II, it doesn't force you to give up core Postgres features. The team behind it argues that existing poolers introduce leaky abstractions that require application code changes, often at scale. PgDog aims to fix that.

Session state without the leaks

Traditional poolers reuse connections between clients, which means session-level state — like SET commands — leaks across clients. That's a problem if you rely on SET for Row-Level Security (RLS) or query timeouts. PgDog solves this by parsing SET statements with its built-in SQL parser, storing the state per client, and restoring it before each query. It uses query pipelining to batch multiple SET restorations into a single round trip, keeping performance impact minimal.

LISTEN/NOTIFY that actually works with pooling

LISTEN and NOTIFY are another casualty of traditional poolers in transaction mode. PgDog handles them internally: it uses Tokio's broadcast channel to move messages between clients in the same process, and a dedicated Postgres connection to sync across multiple PgDog processes. The result is that pub/sub semantics work transparently, preserving transactional guarantees.

Multithreaded by default

Built on Tokio, PgDog uses async Rust with multithreaded workers. Each client gets its own async task, scaling linearly with connections. This avoids the sharding problem of PgBouncer (which requires SO_REUSEPORT and per-process connection pools) and the cold-start latency of autoscaling proxies. A single PgDog process can handle more clients and queries, simplifying operations — one metrics endpoint, one health check, no kernel-level tricks.

Production-proven

PgDog has been in production for over a year, pooling connections at 2M queries per second. It's open source (MIT) and deployable anywhere. If you've been avoiding connection pooling because you can't give up SET or LISTEN/NOTIFY, this might be the pooler you've been waiting for.