---
id: "pgpool"
type: "component"
kind: "database-proxy"
provider: "default"
category: "data"
docs: "https://www.pgpool.net/docs/latest/en/html/runtime-config-connection-pooling.html"
url: "https://localhost:3000/catalogue/components/pgpool"
---

# Pgpool-II

PostgreSQL middleware providing connection pooling, SELECT load balancing, query cache and failover.

| | |
|---|---|
| Provider | [default](https://localhost:3000/catalogue?provider=default) |
| Kind | [Database proxy](https://localhost:3000/catalogue/kinds/database-proxy) |
| Category | Data |
| Official docs | [https://www.pgpool.net/docs/latest/en/html/runtime-config-connection-pooling.html](https://www.pgpool.net/docs/latest/en/html/runtime-config-connection-pooling.html) |

## Properties

| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| `hedging` (advanced) | boolean | — | no | false | inherited |
| `loadBalanceMode` | boolean | — | no | true | inherited |
| `loadShedding` (advanced) | boolean | — | no | false | inherited |
| `managed` | boolean | — | no | false | inherited |
| `maxPool` | integer | — | no | 4 | inherited |
| `memoryCacheEnabled` | boolean | — | no | false | inherited |
| `poolSharded` (advanced) | boolean | — | no | false | inherited |
| `pooling` | boolean | — | no | true | **true** |
| `requestCoalescing` (advanced) | boolean | — | no | false | inherited |
| `routing` | enum | `none`, `shard-key`, `lookup` | no | "none" | **"none"** |
| `scatterGather` (advanced) | boolean | — | no | false | inherited |
| `statementLevelLoadBalance` | boolean | — | no | false | inherited |

Bold values are the ones this component pins.

## Rules that apply · 0

No rule selects this kind or its category.

## Other products of the same kind · 13

- [Amazon RDS Proxy](https://localhost:3000/catalogue/components/rds-proxy.md) `rds-proxy` — aws
- [Cloudflare Hyperdrive](https://localhost:3000/catalogue/components/cloudflare-hyperdrive.md) `cloudflare-hyperdrive` — cloudflare
- [Generic database proxy](https://localhost:3000/catalogue/components/database-proxy.md) `database-proxy` — default
- [MariaDB MaxScale](https://localhost:3000/catalogue/components/maxscale.md) `maxscale` — default
- [mongos](https://localhost:3000/catalogue/components/mongos.md) `mongos` — default
- [Odyssey](https://localhost:3000/catalogue/components/odyssey.md) `odyssey` — default
- [PgBouncer](https://localhost:3000/catalogue/components/pgbouncer.md) `pgbouncer` — default
- [PgCat](https://localhost:3000/catalogue/components/pgcat.md) `pgcat` — default
- [ProxySQL](https://localhost:3000/catalogue/components/proxysql.md) `proxysql` — default
- [Supavisor](https://localhost:3000/catalogue/components/supavisor.md) `supavisor` — default
- [Vitess](https://localhost:3000/catalogue/components/vitess.md) `vitess` — default
- [Cloud SQL Auth Proxy](https://localhost:3000/catalogue/components/google-cloud-sql-auth-proxy.md) `google-cloud-sql-auth-proxy` — gcp
- [IBM Data Virtualization](https://localhost:3000/catalogue/components/ibm-data-virtualization.md) `ibm-data-virtualization` — ibm

## Use it in a design

```yaml
nodes:
  - { id: "pgpool", component: "pgpool" }
```

## Source (`component` YAML, verbatim)

```yaml
# yaml-language-server: $schema=../../schema/component.schema.json
# Pgpool-II: PostgreSQL middleware doing connection pooling, load balancing and failover.
# "Connection Pooling" and "Load Balancing" runtime config: connection_cache is on,
# max_pool is 4, load_balance_mode is on and memory_cache_enabled is off by default.
schemaVersion: "1"
type: "component"
id: "pgpool"
kind: "database-proxy"
provider: "default"
docs: "https://www.pgpool.net/docs/latest/en/html/runtime-config-connection-pooling.html"
defaults:
  pooling: true
  routing: "none"
properties:
  loadBalanceMode:
    type: "boolean"
    default: true
  maxPool:
    type: "integer"
    default: 4
  memoryCacheEnabled:
    type: "boolean"
    default: false
  statementLevelLoadBalance:
    type: "boolean"
    default: false
```

Human page: https://localhost:3000/catalogue/components/pgpool
