Skip to content

Add pscale pgbouncer commands for dedicated Postgres poolers - #1331

Merged
no-itsbackpack merged 5 commits into
mainfrom
feat/pgbouncer
Aug 11, 2026
Merged

Add pscale pgbouncer commands for dedicated Postgres poolers#1331
no-itsbackpack merged 5 commits into
mainfrom
feat/pgbouncer

Conversation

@no-itsbackpack

@no-itsbackpack no-itsbackpack commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds pscale pgbouncer list|show|create|delete|resize for dedicated Postgres branch PgBouncers (API client + mocks + CLI).
  • Resize queues an async change request (--size, --replicas-per-cell, --target, --parameters) with resize status / resize cancel and optional --wait.
  • PrefLights with RequirePostgresDatabase so Vitess/MySQL get a clear engine error (API currently returns a generic not_found).
  • Distinct from pscale branch resize pgbouncer.* parameters (local node pooler knobs).

Test plan

  • go test ./internal/cmd/pgbouncer/ ./internal/planetscale/ -count=1
  • Local pscaledev: create → resize → status → cancel → delete on speedydb/odcr-160/main
  • Vitess reject on odcr-m160-vitess
  • Resize with no flags rejected client-side

Expose list/show/create/delete against the Postgres bouncers API, with an
always-on engine check so Vitess databases get a clear error instead of a
generic API 404.

Co-authored-by: Cursor <cursoragent@cursor.com>
@no-itsbackpack
no-itsbackpack requested a review from a team as a code owner August 10, 2026 23:31
Dedicated PgBouncer changes use the async resize-request API (size,
replicas-per-cell, target, parameters), with --wait matching branch resize.

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 465de52. Configure here.

Comment thread internal/planetscale/postgres_bouncer_resizes.go
no-itsbackpack and others added 2 commits August 10, 2026 19:19
An empty body left a zero-valued resize request, so --wait polled until
timeout and success output reported a blank state. Mirror the branch resize
behavior and return nil, then report no_change. Also fixes gofmt alignment.

Co-authored-by: Cursor <cursoragent@cursor.com>
@no-itsbackpack
no-itsbackpack merged commit bbe60af into main Aug 11, 2026
4 checks passed
@no-itsbackpack
no-itsbackpack deleted the feat/pgbouncer branch August 11, 2026 17:12
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