Administration
Shell Completion
Enable tab completion for commands, flags, and instance names.
Bash
Zsh
Fish
PowerShell
PostgreSQL Configuration
Modify PostgreSQL runtime parameters via pg exec with ALTER SYSTEM, then reload:
Note: Some parameters (e.g. shared_buffers, max_connections) require a restart rather than reload. Use pg stop && pg start to apply those changes.
Configuration File Management
Inspect or validate the config file (~/.pgcli/pg.yaml by default, override with -c).
Init generates a default config; --add creates a named instance in the same file, -o writes to a custom path:
--backup-dir puts backup data and logs on a different path from instance data.
This is the typical production setup: PG data on one disk, backups on another,
so a data-disk failure does not cascade into backup loss.
Isolation parameters for running multiple configs on one host (see Quick Start for planning):
| Parameter | Default | Meaning |
|---|---|---|
--namespace |
default |
Prefix for container names: pgcli-pg-<namespace>-<instance>, backup container pgcli-backup-<namespace>. Pass --namespace "" to keep legacy names without a prefix |
--base-dir |
~/.pgcli |
Base directory for all data paths (instance data, addon config, backup) |
--backup-dir |
(under --base-dir) |
Separate base directory for backup data/log. Overrides the backup path set by --base-dir |
--pg-start-port |
35432 |
First PG host port in the allocation range |
--pg-ssh-port |
42201 |
First SSH host port in the allocation range |
All saved into the config file (namespace, pg_start_port, pg_ssh_port); use disjoint port ranges across configs so allocations never collide.