PgDoorman vs SPQR
PgDoorman
ozontech.github.ioSPQR
docs.pg-sharding.techSide by side
| Figure | PgDoorman | SPQR |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| macOS | Yes | — |
| Linux | Yes | Yes |
| API | — | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Database Proxy Software | 7.5 (#18) | 7.8 (#9) |
| Deployment | PgDoorman can be built from source, installed from distribution packages, or downloaded as a prebuilt binary; Docker is intended for development, CI, and demos rather than production. | The getting-started guide provides a Docker image and lists router, admin console, and gRPC API ports as 6432, 7432, and 7000. |
| What it does | PgDoorman is a multithreaded PostgreSQL connection pooler written in Rust and described as a drop-in replacement for PgBouncer and Odyssey. | SPQR is a stateless PostgreSQL query router for horizontally scaling PostgreSQL through sharding. |
Plans
In their own words
PgDoorman
PgDoorman is a free, open-source, self-hosted PostgreSQL connection pooler written in Rust. It is described as a drop-in replacement for PgBouncer and Odyssey, and supports PostgreSQL 10 and newer on Linux or macOS. Listed capabilities include connection pooling, load balancing, and automatic failover; query routing is not supported. The pool coordinator enforces per-database connection caps and can reclaim idle capacity from pools with spare connections. Patroni-assisted fallback can direct new connections to another live cluster member during a switchover. Monitoring includes a Prometheus endpoint and an optional local diagnostic console for pool, latency, error, query, log, CPU, and memory information. Authentication includes MD5 or SCRAM passthrough, auth_query, PAM, JWT, Talos JWT, and pg_hba.conf rules. TLS is supported for client and backend connections. It can be built from source, installed from packages, or downloaded as a binary.
SPQR
SPQR is a self-hosted query router for horizontally scaling PostgreSQL through sharding. It can extract a sharding key from a query and route it to the relevant key range and shard when possible; keys can use one column or several. Queries can also specify a key or shard in a SQL comment. Applications connect using the PostgreSQL protocol, and the router and coordinator provide administrative consoles accessible through psql. SPQR supports one-phase and two-phase commit strategies; two-phase commit provides atomicity across shards and requires max_prepared_transactions greater than zero on each shard. The system can move data between shards to balance workload, and the project describes reducing transferred ranges to limit locking impact. Its documentation includes Docker and configuration-file deployment instructions. SPQR is free and distributed under the PostgreSQL Global Development Group License. The FAQ cautions that it is not suited to complex cross-shard queries, transactions modifying multiple shards or OLAP workloads, and reports a roughly 10–30% performance drop versus vanilla PostgreSQL depending on workload.