Add pscale branch resize for Postgres branches#1276
Merged
Conversation
Adds 'pscale branch resize <database> <branch> --cluster-size <size>',
which resizes a Postgres branch's cluster via the new
PostgresBranches.Resize client (PATCH .../branches/{branch}/changes).
MySQL databases are pointed at 'pscale keyspace resize', since the
branch-level cluster change endpoint is Postgres-only. Bumps
planetscale-go to v0.171.0.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4b2cf7f. Configure here.
- Complete --cluster-size from the branch's own Postgres SKUs (PostgresBranches.ListClusterSKUs), returning the fully-qualified SKU names the resize endpoint accepts, instead of org-wide MySQL slugs. - On a 204 no-op, note it on stderr in non-human formats so scripted callers aren't left with completely silent output. Addresses Bugbot review comments on #1276.
mscoutermarsh
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Adds
pscale branch resize <database> <branch> --cluster-size <size>to resize a Postgres branch's cluster.It calls the new
PostgresBranches.Resizeclient (planetscale-go v0.171.0), which hits the async branch change-request endpointPATCH .../branches/{branch}/changesand returns aPostgresClusterResizeRequest.--format jsonprints the full change request.MySQL databases are pointed at
pscale keyspace resizewith a clear error, since the branch-level cluster change endpoint is Postgres-only (the MySQL/Vitess resize stays at the keyspace level).Notes
--cluster-sizetakes the fully-qualified SKU name as shown bypscale size cluster list(e.g.PS_10_GCP_X86); the API rejects the shortPS_10form for this endpoint.Testing
go build ./...andgo test ./...pass.mint-demo):PS-5 → PS-10 → PS-5round trip completed, and a concurrent call correctly returned "cluster resize in progress".Dependencies