pscale-read-only-replica
pscale read-only-replica
Manage dedicated read-only capacity for a PlanetScale PostgreSQL branch. These named resources are separate from the primary branch cluster's replicas and from Vitess/MySQL read-only regions.
Read before writing
# Inventory the branch when the replica name is unknown
pscale read-only-replica list <database> <branch> --org <org> --format json
# Or inspect one exact target when its name is already known; do not run both
pscale read-only-replica show <database> <branch> <name> --org <org> --format json
The command group checks the database kind itself and rejects Vitess databases, so a separate database show preflight is unnecessary. Use pscale region list --org <org> --format json to discover region slugs. Inspect the primary branch before choosing capacity; omitting --cluster-size inherits its size, which is usually the safest and least wasteful starting point. When an explicit override is intentional, use pscale size cluster list --org <org> --engine postgresql --format json and choose a fully qualified SKU matching the branch's provider and architecture. Interactive completion for create/update --cluster-size is already scoped to the target Postgres branch's engine, provider, and architecture and is preferred when available.
List/show JSON serializes the underlying API model rather than the normalized human/CSV fields. Expect API-native nested objects and names, probe a representative response before automating, and use defensive access such as .region.slug // .region.name // empty and .cluster_display_name // .cluster_name // empty rather than assuming a fixed flattened schema.
To validate branch-level replica routing after provisioning, run a read-only query with the actual replica flag: