# postgresml/pgcat

PostgreSQL pooler with sharding, load balancing and failover support.

Repository: https://github.com/postgresml/pgcat
Canonical: https://ross.abutalabs.com/products/pgcat
Language: Rust
License: MIT
License Family: permissive
Topics: pooler, postgresql, pooling, rust
Last push: 2025-02-27T21:51:01+00:00

## Health v2 (maintenance only)
Score: 38/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 8, release rhythm 40, longevity 100
- inputs: {"age_days": 1677, "days_push": 552, "days_rel": 660, "gap_med": 4.0, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4009, forks 265 (observed 2026-08-28T04:08:32.250898+00:00)

## What it is
PgCat is a PostgreSQL connection pooler and proxy written in Rust, similar to PgBouncer, with support for sharding, load balancing, failover, and query mirroring. It is multi-threaded, production-tested at high query volumes, and exposes statistics via an admin database and Prometheus.

## Use cases
- pool postgres connections for a high-traffic app
- load balance read queries across postgres replicas
- automatically fail over when a postgres replica goes down
- shard postgres queries across multiple databases
- mirror production traffic to a staging postgres server
- replace pgbouncer with a multi-threaded pooler
- monitor postgres pool statistics with prometheus

## When to choose
- you need transaction or session pooling beyond what PgBouncer offers
- you want automatic load balancing and failover across replicas
- you need query sharding or traffic mirroring
- you run Postgres at high query-per-second volumes on multicore machines

## When to avoid
- you need only the simplest pooling setup and already run PgBouncer happily
- you rely on experimental features like automatic sharding in critical production paths
- you don't run PostgreSQL

## Facets
- artifact type: service
- maturity: stable
- function: database, proxy, load-testing, monitoring, security
- domain: databases, backend, infrastructure-as-code
- platform: rust, self-hosted
- tags: postgresql, pooler, pgbouncer-alternative, sharding, failover, load-balancing, connection-pooling, tokio, devops, linux, macos, docker

## Member repositories
- postgresml/pgcat (main) score 38

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:32.250898+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:24:02.356348+00:00, confidence not recorded.
  - readme: https://github.com/postgresml/pgcat (fetched 2026-08-28T04:08:32.250898+00:00, sha b3abfd4fd3a0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
