Repository navigation
Add storage IOPS and throughput flags to Postgres restores - #1514
Merged
mscoutermarsh merged 2 commits intoNov 17, 2026
Merged
Conversation
no-itsbackpack
approved these changes
Nov 10, 2026
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
force-pushed
the
cursor/branch-create-storage-performance-f716
branch
from
November 17, 2026 16:03
0c96fae to
ea8a36d
Compare
mscoutermarsh
marked this pull request as ready for review
November 17, 2026 16:05
eileencodes
approved these changes
Nov 17, 2026
mscoutermarsh
deleted the
cursor/branch-create-storage-performance-f716
branch
November 17, 2026 16:07
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.
pscale backup restoreandpscale branch create(with--restoreor--restore-point) accept--storage-iopsand--storage-throughput(MiB/s) for Postgres restores. Both values go on the existing storage object asstorage_iopsandstorage_throughput_mibs, which the API accepts since planetscale/api-bb#23693.Either flag without a restore on
branch createreturns 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
StorageConfigdid not have these fields, so they were added here.Tests:
TestBackup_RestoreCmd_PostgreSQLsends both values onbackup restore.TestBackup_RestoreCmd_RejectsStoragePerformanceOnNekicovers the Neki rejection.TestBranch_CreateCmdWithRestoreStoragePerformanceandTestBranch_CreateCmdRejectsStoragePerformanceWithoutRestorecoverbranch create.TestPostgresBranches_CreateWithStoragechecks the JSON names.Verified against production:
pscale backup restore macros restore-iops-flags <backup> --storage-iops 4500 --storage-throughput 275stored 4500/275 on the cluster, and the restored volume usesaws-ebs-gp3-004500i-0275t.https://github.com/planetscale/issues/issues/2431