---
title: Connection Pools
url: https://docs.vultr.com/products/storage/databases/postgresql/management/connection/connection-pools
description: Learn how to create, configure, and manage connection pools to optimize database performance for Vultr Managed PostgreSQL databases.
publish_date: 2024-09-23T20:21:43.625435Z
last_updated: 2026-05-26T19:44:21.939623Z
---

# How to Manage Connection Pools for Vultr Managed Databases for PostgreSQL

Connection pools provide a cache of reusable database connections to improve database response time. The cache allows your PostgreSQL server to serve many HTTP requests with fewer database connections. Connection pools reduce latency by reducing the number of times the PostgreSQL server creates new connections leading to better end-user experience.

Follow this guide to manage connection pools for Vultr Managed Databases for PostgreSQL using the Vultr Console, API, and CLI.

=== "Vultr Console"

    1. Navigate to **Products** and select **Databases**.
    1. Click the target managed database instance.
    1. Navigate to **Connection Pools** and click **Add New Connection Pool**.
    1. Enter the details and click **Create Pool**.
    1. Click **Edit** to change the connection pool details or **Delete Pool** to remove the pool from the database.

=== "Vultr API"

    1. List all the database instances by sending a `GET` request to the [**List Managed Databases** endpoint](https://www.vultr.com/api/#tag/managed-databases/operation/list-databases) and note the database ID. For example, `43b4c774-5dff-4ac0-a01f-78a23c2205b5`.

        ```console
        $ curl "https://api.vultr.com/v2/databases" \
            -X GET \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

    1. Send a `POST` request to the [**Create Connection Pool** endpoint](https://www.vultr.com/api/#tag/managed-databases/operation/create-connection-pool) to create a connection pool and specify the database ID.

        ```console
        $ curl "https://api.vultr.com/v2/databases/database-id/connection-pools" \
            -X POST \
            -H "Authorization: Bearer ${VULTR_API_KEY}" \
            -H "Content-Type: application/json" \
            --data '{
                "name" : "sample-pool",
                "database" : "defaultdb",
                "username" : "vultradmin",
                "mode" : "transaction",
                "size" : 10
            }'
        ```

    1. Send a `GET` request to the [**List Connection Pools** endpoint](https://www.vultr.com/api/#tag/managed-databases/operation/list-connection-pools) to list all the connection pools.

        ```console
        $ curl "https://api.vultr.com/v2/databases/database_id/connection-pools" \
            -X GET \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```

    1. Send a `PUT` request to the [**Update Connection Pool** endpoint](https://www.vultr.com/api/#tag/managed-databases/operation/update-connection-pool) and specify the database ID and the pool `name` to update.

        ```console
        $ curl "https://api.vultr.com/v2/databases/database-id/connection-pools/pool-name" \
            -X PUT \
            -H "Authorization: Bearer ${VULTR_API_KEY}" \
            -H "Content-Type: application/json" \
            --data '{
                "mode" : "session"
            }'
        ```

    1. Send a `DELETE` request to the [**Delete Connection Pool** endpoint](https://www.vultr.com/api/#tag/managed-databases/operation/delete-connection-pool) and specify a database ID and a pool `name` to remove the pool from the database.

        ```console
        $ curl "https://api.vultr.com/v2/databases/database_id/connection-pools/pool_name" \
            -X DELETE \
            -H "Authorization: Bearer ${VULTR_API_KEY}"
        ```
