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 active. 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. Run the List PostgreSQL Managed Databases operation and store the label for the target database.

string
required

The name of the connection pool. These points apply:

  • A label needs to be unique in a database instance.

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

  • A label has a maximum length of 63 characters.

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

Response body
object

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. Run the List PostgreSQL Managed Databases operation and store the label for the target database.

string
required

The name of the connection pool. These points apply:

  • A label needs to be unique in a database instance.

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

  • A label has a maximum length of 63 characters.

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.

session statement transaction

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.

Language
Credentials