POST /v2/databases/{database_cluster_uuid}/pools

For PostgreSQL database clusters, connection pools can be used to allow a database to share its idle connections. The popular PostgreSQL connection pooling utility PgBouncer is used to provide this service. See here for more information about how and why to use PgBouncer connection pooling including details about the available transaction modes.

To add a new connection pool to a PostgreSQL database cluster, send a POST request to /v2/databases/$DATABASE_ID/pools specifying a name for the pool, the user to connect with, the database to connect to, as well as its desired size and transaction mode.

Servers

Path parameters

Name Type Required Description
database_cluster_uuid String Yes

A unique identifier for a database cluster.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
name String Yes

A unique name for the connection pool. Must be between 3 and 60 characters.

size Integer Yes

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.

db String Yes

The database for use with the connection pool.

user String No

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

mode String Yes

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

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.