doctl Verified current stable Not installed? Cloud Infrastructure

Doctl / List Connection Pools For Database Cluster

List Connection Pools For Database Cluster

List all connection pools for a specified database cluster.

$
Terminal
doctl d p ls <database_id>

When To Use

When managing multiple connection pools and assessing configuration or performance metrics.

Pro Tip

Use `--filter` to limit results to only the necessary pools you wish to retrieve.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
doctl d p ls <database_id>

Anatomy of Output

Understanding the result

Listing connection pools for Database ID: 456789 Query Status

Indicates the database for which pools are being listed.

Pools Found: 3 Pool Count

Indicates the total number of pools associated.

- main-app-pool Pool Name

First pool listed in the results.

- reporting-pool Pool Name

Second pool listed in the results.

- analytics-pool Pool Name

Third pool listed in the results.

Power User Variants

Optimized versions

doctl databases pool list 456789 --filter active

List only active connection pools.

doctl databases pool list 456789 --sort name

Sort connection pools alphabetically.

Troubleshooting

Common pitfalls

Error: No connection pools found for the specified database.

Solution: Ensure the database ID is correct and that pools exist.

Error: Database ID is required to list pools.

Solution: Provide a valid database ID.

Error: Listing error - internal server error.

Solution: Retry the command after a brief moment.

Command Breakdown

What each part is doing

doctl
Base Command
The executable that performs this operation. Here it runs Doctl before the shell applies any redirect operators.
d
d|databases
The value supplied for d|databases.
p
p|pool
The value supplied for p|pool.
ls
ls|list
The value supplied for ls|list.
<database_id>
database id
The value supplied for database id.

Alternative Approaches

Comparable commands in other tools

Alternative cloud infrastructure tools for the same job.