---
title: "db update"
description: "Update database settings"
canonical: "https://pgbeam.com/docs/cli/db/update"
last-updated: "2026-10-29T19:01:20.000Z"
---

# db update

> Update database settings

URL: https://pgbeam.com/docs/cli/db/update

{/* Auto-generated from CLI commands. Do not edit. Run `pnpm generate:cli-docs` to regenerate. */}

Update the configuration of an existing database connection. Supports changing the display name, cache settings (enable/disable, TTL), and connection pool settings (mode, size). At least one update flag must be provided. Current settings are preserved for any flag not specified.

## Usage

```bash
pgbeam db update <id> [flags]
```

## Options

| Option                    | Description                                                            | Required | Default |
| ------------------------- | ---------------------------------------------------------------------- | -------- | ------- |
| `<id>`                    | ID of the database to update                                           | Yes      | -       |
| `--name <value>`          | New display name for the database                                      | No       | -       |
| `--cache-enabled`         | Enable or disable query result caching for this database               | No       | -       |
| `--cache-ttl <value>`     | Time-to-live for cached query results, in seconds                      | No       | -       |
| `--pool-mode <value>`     | Connection pool mode: transaction, session, or statement               | No       | -       |
| `--pool-size <value>`     | Maximum number of connections in the pool (default: 10)                | No       | -       |
| `--min-pool-size <value>` | Minimum number of idle connections maintained in the pool (default: 1) | No       | -       |

> **Global options**
>
> All [global options](/docs/cli/global-options) (`--token`, `--profile`,
> `--project`, `--org`, `--json`, `--no-color`, `--no-trunc`, `--debug`) are
> also available on this command.

## Examples

```bash
# Enable caching with a 60-second TTL
pgbeam db update db_xxx --cache-enabled --cache-ttl 60

# Switch to transaction pooling
pgbeam db update db_xxx --pool-mode transaction

# Adjust pool size limits
pgbeam db update db_xxx --pool-size 20 --min-pool-size 5

# Rename the database
pgbeam db update db_xxx --name production-primary
```

## Output

Prints a success message confirming the database was updated. With `--json`, returns the updated database object.