Administration
Administration guide for pgcli
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:
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 |
--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 three are saved into the config file (namespace, pg_start_port, pg_ssh_port); use disjoint port ranges across configs so allocations never collide.