v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_Databases

Update Connection Pools (PostgreSQL)

To update a connection pool for a PostgreSQL database cluster, send a PUT request to /v2/databases/$DATABASE_ID/pools/$POOL_NAME.

put/v2/databases/{database_cluster_uuid}/pools/{pool_name}

Path parameters

database_cluster_uuidstring uuid required

A unique identifier for a database cluster.

pool_namestring required

The name used to identify the connection pool.

Request body

modestring required

The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.

sizeinteger required

The desired size of the PGBouncer connection pool. The maximum allowed size is determined by the size of the cluster's primary node. 25 backend server connections are allowed for every 1GB of RAM. Three are reserved for maintenance. For example, a primary node with 1 GB of RAM allows for a maximum of 22 backend server connections while one with 4 GB would allow for 97. Note that these are shared across all connection pools in a cluster.

dbstring required

The database for use with the connection pool.

userstring

The name of the user for use with the connection pool. When excluded, all sessions connect to the database as the inbound user.

Example request

{
  "mode": "transaction",
  "size": 10,
  "db": "defaultdb",
  "user": "doadmin"
}

Response

The action was successful and the response body is empty.