Linux command
doctl-databases-pool 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List all connection pools
doctl databases pool list [cluster_id]
Create a connection pool
doctl databases pool create [cluster_id] [pool_name] --db [database] --user [user] --size [10] --mode [transaction]
Get details of a specific pool
doctl databases pool get [cluster_id] [pool_name]
Update a connection pool
doctl databases pool update [cluster_id] [pool_name] --size [20]
Delete a connection pool
doctl databases pool delete [cluster_id] [pool_name]
说明
doctl databases pool manages connection pools for PostgreSQL managed databases on DigitalOcean. Connection pools use PgBouncer to provide connection multiplexing, significantly improving performance for applications with many concurrent clients. Pools act as intermediaries between applications and the database, maintaining a set number of reusable database connections. This reduces overhead from repeatedly opening and closing connections. Pool modes determine connection behavior: transaction mode releases connections after each transaction (fastest for stateless queries), session mode holds connections for the entire client session, and statement mode releases after each individual statement.
参数
- --db _string_
- Target database name for the pool.
- --user _string_
- Database username for pool authentication.
- --size _int_
- Pool size (number of connections to maintain).
- --mode _string_
- Pool mode: transaction (default, fastest), session (preserves session state), or statement.
- --format _string_
- Customize output columns.
FAQ
What is the doctl-databases-pool command used for?
doctl databases pool manages connection pools for PostgreSQL managed databases on DigitalOcean. Connection pools use PgBouncer to provide connection multiplexing, significantly improving performance for applications with many concurrent clients. Pools act as intermediaries between applications and the database, maintaining a set number of reusable database connections. This reduces overhead from repeatedly opening and closing connections. Pool modes determine connection behavior: transaction mode releases connections after each transaction (fastest for stateless queries), session mode holds connections for the entire client session, and statement mode releases after each individual statement.
How do I run a basic doctl-databases-pool example?
Run `doctl databases pool list [cluster_id]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --db _string_ do in doctl-databases-pool?
Target database name for the pool.