Create a PostgreSQL connection pool

Configure PGBouncer connection pool settings, using our partner Aiven's specification. You can only create a connection pool on an active cluster in an existing PostgreSQL Managed Database. Run the List PostgreSQL Managed Databases operation, locate the desired database, and verify its status is not suspended. Then store both its id, as your postgresqlInstanceId, and its label.

Permissions and scopes

To call this operation, you need the following:

  • Identity and access permissions. Your user needs these roles assigned. Learn more.

    • Roles: database_admin
  • OAuth scopes. Your user needs these scopes assigned. Learn more.

    • Scopes: databases:read_write

CLI

linode-cli databases postgresql-conn-pool-create \
  --database PostgreSQL-DB-video-streaming-data
  --mode session
  --label Connection-Pool-01 \
  --size 10 \
  --username john-doe

Learn more

Path Params
string
enum
required

Enum Call either the v4 URL, or v4beta for operations still in Beta.

Allowed:
integer
required

The unique identifier for a PostgreSQL Managed Database. Run the List PostgreSQL Managed Databases operation and store the id for the desired one.

Body Params

The PostgreSQL Managed Database connection pool request object.

string
Defaults to defaultdb

The name of the PostgreSQL Managed Database where the connection pool is assigned. This is the Database name value from connection details. To learn how to get this value, see View connection details.

string
required

The name of the connection pool. These points apply:

  • It needs to be unique in a database instance.

  • It can contain alphanumeric characters, underscores, or hyphens, and it can't start with hyphen.

  • It has a maximum length of 63 characters.

  • It can't be edited once the connection pool is created.

string
enum
required
Defaults to transaction

Set the connection pooling mode based on the specification set by our partner, Aiven. Select from transaction, session, or statement.

Allowed:
integer
required
Defaults to 10

The number of connections in the pool. This can't exceed the number of available connections for your service plan.

string | null
required
Defaults to null

The username of the client making the connection. The default of null reuses the inbound user.

Responses

Language
Credentials
LoadingLoading…
Response
Choose an example:
application/json