PgBeam Docs
projectsreplicas

replicas add

Add a read replica

Add a read replica to a database connection. PgBeam can route read-only queries to replicas for improved performance and load distribution. Without the --host flag, the command prompts for the replica hostname interactively.

Usage

pgbeam replicas add [flags]

Options

OptionDescriptionRequiredDefault
--database-id <value>ID of the database to add the replica toYes-
--host <value>Hostname or IP address of the replica serverNo-
--port <value>Port number of the replica serverNo5432
--ssl-mode <value>SSL connection mode: disable, require, verify-ca, or verify-fullNo-

Global options

All global options (--token, --profile, --project, --org, --json, --no-color, --debug) are also available on this command.

Examples

# Add a replica interactively
pgbeam replicas add --database-id db_xxx

# Add a replica with all flags
pgbeam replicas add --database-id db_xxx --host replica.example.com --port 5432 --ssl-mode require

Output

Prints the new replica ID. With --json, returns the full replica object.

On this page