Skip to main content

avn service connection-pool

Full list of commands for avn service connection-pool.

Manage PgBouncer connection pools

avn service connection-pool-create

Creates a new PgBouncer connection pool for a given PostgreSQL® service.

ParameterInformation
service_nameThe name of the service
--pool-nameThe name of the connection pool
--dbnameThe name of the database
--usernameThe database username to use for the connection pool
--pool-sizeSize of the connection pool in number of connections
--pool-modeThe pool mode. Possible values are transaction, session and statement

Example: In the service demo-pg Create a new connection pool named cp-analytics-it for the database it-analytics with:

  • username avnadmin
  • pool-size of 10 connections
  • transaction pool-mode
avn service connection-pool-create demo-pg \
--pool-name cp-analytics-it \
--dbname analytics-it \
--username avnadmin \
--pool-size 10 \
--pool-mode transaction

avn service connection-pool-delete

Deletes a PgBouncer connection pool for a given PostgreSQL® service.

ParameterInformation
service_nameThe name of the service
--pool-nameThe name of the connection pool

Example: In the service demo-pg delete a connection pool named cp-analytics-it.

avn service connection-pool-delete demo-pg \
--pool-name cp-analytics-it

avn service connection-pool-list

Lists the PgBouncer connection pool for a given PostgreSQL® service.

ParameterInformation
service_nameThe name of the service

Example: List the connection pools available in the service demo-pg.

avn service connection-pool-list demo-pg

An example of avn service connection-pool-list output:

POOL_NAME        DATABASE      USERNAME  POOL_MODE    POOL_SIZE
=============== ============ ======== =========== =========
cp-analytics-it analytics-it avnadmin transaction 10
cp-sales sales-it test-usr session 20

avn service connection-pool-update

Updates a PgBouncer connection pool for a given PostgreSQL® service.

ParameterInformation
service_nameThe name of the service
--pool-nameThe name of the connection pool
--dbnameThe name of the database
--usernameThe database username to use for the connection pool
--pool-sizeSize of the connection pool in number of connections
--pool-modeThe pool mode. Possible values are transaction, session and statement

Example: In the service demo-pg update the connection pool named cp-analytics-it for the database it-analytics with:

  • username avnadmin
  • pool-size of 20 connections
  • session pool-mode
avn service connection-pool-update demo-pg \
--pool-name cp-analytics-it \
--dbname analytics-it \
--username avnadmin \
--pool-size 20 \
--pool-mode session