Skip to content

Add pscale branch switchover for Postgres branches - #1354

Merged
hiradp merged 2 commits into
mainfrom
hirad/branch-switchover
Aug 19, 2026
Merged

Add pscale branch switchover for Postgres branches#1354
hiradp merged 2 commits into
mainfrom
hirad/branch-switchover

Conversation

@hiradp

@hiradp hiradp commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Adds pscale branch switchover <database> <branch>, which starts a switchover of a Postgres branch's primary via POST /v1/organizations/:org/databases/:db/branches/:branch/switchovers.

  • --candidate optionally names the replica to promote (as shown by pscale branch infra); omitted, the operator picks one. Branches without replicas are restarted in place.
  • Postgres only: the help text says so, and Vitess/MySQL databases get a clear error up front via RequirePostgresDatabase instead of the API's generic not_found (Switchovers are only available for PostgreSQL databases; <db> is mysql).
  • Human output prints the started switchover's ID; --format json prints the full resource.

@hiradp
hiradp requested a review from a team as a code owner August 19, 2026 17:30
@hiradp
hiradp merged commit 95ff850 into main Aug 19, 2026
4 checks passed
@hiradp
hiradp deleted the hirad/branch-switchover branch August 19, 2026 18:52

@abudhabidiwan9-star abudhabidiwan9-star left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants