# PgCat

> PostgreSQL pooler with sharding, load balancing and failover support

Source: https://talira.ai/catalog/pgcat-kb1dzs9p
Every listing: https://talira.ai/catalog.md

Status: PgCat looks abandoned: nothing has changed since February 2025, and its makers haven't said it has ended. No commits since 27 February 2025; pull requests opened since then are unmerged, and PostgresML's own site, postgresml.org, no longer serves its pages. Source: https://github.com/postgresml/pgcat/commits/main

- Kind: Open source
- Types: Infrastructure
- Categories: [databases / postgres / connection pooling](https://talira.ai/categories/databases/postgres/connection-pooling)
- Platforms: linux, docker[^2]
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- Backed by: [PostgresML](https://talira.ai/orgs/postgresml.md)

PgCat is a [PostgreSQL](https://talira.ai/catalog/postgresql-cm55wcnd.md) connection pooler and proxy written in Rust on [Tokio](https://talira.ai/catalog/tokio-5dcaannt.md), made as a multi-threaded alternative to [PgBouncer](https://talira.ai/catalog/pgbouncer-ke0bbbm9.md): it pools by transaction or session like PgBouncer, and adds load balancing of read queries across replicas and the primary, failover around broken replicas through health checks, and experimental sharding (by SQL syntax, query comments or automatic detection of the sharding key) and query mirroring. Statistics come from PgBouncer-style admin databases and a [Prometheus](https://talira.ai/catalog/prometheus-198e2rss.md) endpoint, and the configuration reloads live. PostgresML built it and Instacart and [OneSignal](https://talira.ai/catalog/onesignal-cme6jmq0.md) used it in production, but the repository has had no commits since February 2025 and its pull requests go unmerged.

## Links

- GitHub: https://github.com/postgresml/pgcat
- Docs: https://github.com/postgresml/pgcat/blob/main/CONFIG.md

## Problems it solves

- a Postgres connection pooler that uses all CPU cores instead of a single thread
- send read-only queries to our Postgres replicas automatically without changing the app
- route around a broken Postgres replica without the app noticing
- shard a Postgres database by a key and route each query to the right shard from a proxy
- mirror production Postgres queries to a test server to try a new version under real load
- Prometheus metrics for our Postgres connection pool
- pool Postgres connections per transaction and balance them across a primary and replicas

## Features

- transaction and session pooling
- multi-threaded runtime on Tokio
- load balancing of read queries between replicas and the primary
- failover around broken replicas, checked by regular health checks
- PgBouncer-compatible admin statistics through the pgbouncer and pgcat databases
- Prometheus statistics endpoint
- TLS between clients, pooler and servers
- MD5 client authentication; MD5 and SCRAM-SHA-256 to Postgres; auth passthrough with auth_query
- live configuration reloading
- experimental sharding by SQL syntax, query comments or automatic sharding-key detection
- experimental query mirroring to other databases

## Trust

Overall: 0.14 out of 1.
Signals: maintenance 0.00, backing 0.50, extensibility 0.00.

- backed by PostgresML
- used by Instacart, OneSignal

Warnings:

- abandoned: not maintained since February 2025
- GitHub activity not fetched yet

## What people say

- Instacart's engineering blog on adopting PgCat as its Postgres proxy: https://tech.instacart.com/adopting-pgcat-a-nextgen-postgres-proxy-3cf284e68c2f

## Related

- Works with [PostgreSQL](https://talira.ai/catalog/postgresql-cm55wcnd.md)

## Alternatives

- [Supavisor](https://talira.ai/catalog/supavisor-rd7r7r2r.md): A cloud-native, multi-tenant Postgres connection pooler
- [PgBouncer](https://talira.ai/catalog/pgbouncer-ke0bbbm9.md): Lightweight connection pooler for PostgreSQL

## Sources

[^1]: https://github.com/postgresml/pgcat/blob/main/LICENSE (checked 20 Nov 2026)
[^2]: https://github.com/postgresml/pgcat (checked 20 Nov 2026)
