A multithreaded PostgreSQL connection pooler in Rust (MSRV 1.87). Alternative to PgBouncer, Odyssey, and PgCat. In production at Ozon for over three years across Go (pgx), .NET (Npgsql), Python (asyncpg, SQLAlchemy), and Node.js workloads.
📖 Full documentation: ozontech.github.io/pg_doorman
Configuration reference, tutorials, comparison with PgBouncer and Odyssey, benchmarks, deployment guides — all on the documentation site.
docker run -p 6432:6432 \
-v $(pwd)/pg_doorman.yaml:/etc/pg_doorman/pg_doorman.yaml \
ghcr.io/ozontech/pg_doormanGenerate a config from your PostgreSQL:
pg_doorman generate --host db.example.com --user postgres --output pg_doorman.yamlConnect and verify:
psql -h 127.0.0.1 -p 6432 -U admin pgdoorman -c "SHOW VERSION;"For installation from source, distribution packages (Ubuntu PPA, Fedora COPR), and the tls-migration build, see the Installation guide.
- Multithreaded — one process, one shared pool across all worker threads.
- Prepared statements in transaction mode — transparent caching and statement remap; no driver hacks, no
DISCARD ALL. - Pool Coordinator — database-level connection cap with priority eviction and per-user minimums. Learn more.
- Patroni-assisted fallback — automatic backend rerouting via the Patroni REST API when the local node fails. Learn more.
- Graceful binary upgrade — replace the binary without dropping clients; TLS connections migrate cleanly with the
tls-migrationcargo feature. Learn more. - Built-in observability — Prometheus endpoint, HDR-histogram percentiles, structured JSON logs, 18 admin
SHOWcommands.
Continuously updated AWS Fargate results (pgbench, multiple scenarios) live on the benchmarks page. PgDoorman is multiple times faster than PgBouncer on extended-protocol and prepared-statement workloads, and noticeably ahead of Odyssey under the same scenarios.
- Telegram: @pg_doorman
- Issues: github.com/ozontech/pg_doorman/issues
- Contributing: contributing guide
MIT — see LICENSE.
