Skip to content

Add storage IOPS and throughput flags to Postgres restores - #1514

Merged
mscoutermarsh merged 2 commits into
mainfrom
cursor/branch-create-storage-performance-f716
Nov 17, 2026
Merged

mscoutermarsh merged 2 commits into
mainfrom
cursor/branch-create-storage-performance-f716

Conversation

@mscoutermarsh

@mscoutermarsh mscoutermarsh commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

pscale backup restore and pscale branch create (with --restore or --restore-point) accept --storage-iops and --storage-throughput (MiB/s) for Postgres restores. Both values go on the existing storage object as storage_iops and storage_throughput_mibs, which the API accepts since planetscale/api-bb#23693.

Either flag without a restore on branch create returns an error. MySQL and Neki reject the flags: the Neki restore engine ignores the storage hash, so the values would otherwise be dropped silently.

The vendored API client StorageConfig did not have these fields, so they were added here.

Tests:

  • TestBackup_RestoreCmd_PostgreSQL sends both values on backup restore.
  • TestBackup_RestoreCmd_RejectsStoragePerformanceOnNeki covers the Neki rejection.
  • TestBranch_CreateCmdWithRestoreStoragePerformance and TestBranch_CreateCmdRejectsStoragePerformanceWithoutRestore cover branch create.
  • TestPostgresBranches_CreateWithStorage checks the JSON names.

Verified against production: pscale backup restore macros restore-iops-flags <backup> --storage-iops 4500 --storage-throughput 275 stored 4500/275 on the cluster, and the restored volume uses aws-ebs-gp3-004500i-0275t.

https://github.com/planetscale/issues/issues/2431

cursoragent and others added 2 commits November 17, 2026 10:56
Co-authored-by: Mike Coutermarsh <coutermarsh.mike@gmail.com>
Reject both flags on Neki, whose restore ignores the storage hash.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mscoutermarsh
mscoutermarsh force-pushed the cursor/branch-create-storage-performance-f716 branch from 0c96fae to ea8a36d Compare November 17, 2026 16:03
@mscoutermarsh mscoutermarsh changed the title Add storage IOPS and throughput flags to branch create Add storage IOPS and throughput flags to Postgres restores Nov 17, 2026
@mscoutermarsh
mscoutermarsh marked this pull request as ready for review November 17, 2026 16:05
@mscoutermarsh
mscoutermarsh requested a review from a team as a code owner November 17, 2026 16:05
@mscoutermarsh
mscoutermarsh merged commit 938b0ac into main Nov 17, 2026
6 checks passed
@mscoutermarsh
mscoutermarsh deleted the cursor/branch-create-storage-performance-f716 branch November 17, 2026 16:07
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.

4 participants