Skip to content

Add dedicated-read-replica detach command for Postgres - #1495

Merged
nholden merged 1 commit into
mainfrom
dedicated-read-replica-detach
Oct 30, 2026
Merged

nholden merged 1 commit into
mainfrom
dedicated-read-replica-detach

Conversation

@nholden

@nholden nholden commented Oct 30, 2026

Copy link
Copy Markdown
Member

Adds pscale dedicated-read-replica detach for Postgres databases. It detaches a dedicated read replica from its branch and promotes it to a standalone branch with the same name, size, and replica count. The user confirms the replica name first, or passes --force to skip the prompt.

$ pscale dedicated-read-replica detach my-db main analytics --org my-org
? Please type my-db/main/analytics to confirm: my-db/main/analytics
Dedicated read replica analytics was successfully detached from my-db/main and is now branch analytics.
The new branch is still being promoted. Check it with pscale branch show my-db analytics.

The API still gates detachment behind a feature flag, so the command is hidden from help output until the feature is generally available.

Add a hidden `pscale dedicated-read-replica detach <database> <branch>
<name>` command for Postgres databases. It calls the dedicated read
replica detachment endpoint, which discards the replica and promotes it
to a standalone branch with the same name, size, and replica count.

The command asks for confirmation unless --force is passed, rejects
MySQL databases before any API call, and prints the new branch in
human, JSON, or CSV format. It is hidden from help output while the
API keeps detachment behind a feature flag.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@nholden nholden self-assigned this Oct 30, 2026
@nholden
nholden marked this pull request as ready for review October 30, 2026 19:44
@nholden
nholden requested a review from a team as a code owner October 30, 2026 19:44
@nholden
nholden merged commit fb7aac3 into main Oct 30, 2026
5 checks passed
@nholden
nholden deleted the dedicated-read-replica-detach branch October 30, 2026 20:02
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.

2 participants