fix(config): add PG17 image mapping for db dump - #5083
Closed
nanookclaw wants to merge 2 commits into
Closed
Conversation
Add case 17 to the MajorVersion switch in config Load() so that major_version=17 resolves to the correct Docker image (supabase/postgres:17.6.1.106). Without this fix, db dump fails with 'server version mismatch' against remote PG17 databases because the Image field is never set for version 17. The Validate() function already accepts case 15, 17 as valid, but Load() never mapped version 17 to an image. Fixes supabase#5007 Signed-off-by: Nanook Claw <nanook@agentmail.to>
3 tasks
Contributor
|
Hello, thanks for your contributions. |
pull Bot
pushed a commit
to pjpjq/cli
that referenced
this pull request
Jun 22, 2026
## Summary Make the TS legacy Postgres image resolver read the default image from the same Dockerfile manifest used by the Go config image table. This removes the duplicated PG17 tag from the TS port, keeps `db dump` aligned with Dependabot updates to `apps/cli-go/pkg/config/templates/Dockerfile`, and preserves the existing service image parser export for callers. ## Context PR supabase#5083 highlighted that PG image selection can drift when the default Postgres image is copied into multiple places. The active TS `db dump` path already selected a PG17 image, but its hardcoded tag had drifted from the Dockerfile manifest.
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.
Summary
Add
case 17to theMajorVersionswitch inconfig.Load()so thatmajor_version = 17resolves to the correct Docker image (supabase/postgres:17.6.1.106).Problem
supabase db dumpfails with "server version mismatch" when the remote database is PostgreSQL 17. The CLI's Docker container uses pg_dump 15.6, which refuses to connect to a PG 17.6 server.Root cause:
Load()only handlescase 13,case 14,case 15— there is nocase 17. TheImagefield is taggedtoml:"-"so users cannot override it viaconfig.toml. TheValidate()function already acceptscase 15, 17:as valid, somajor_version = 17is accepted — it just never assigns the correct Docker image.Changes
pkg/config/constants.go: Addpg17 = "supabase/postgres:17.6.1.106"constant (matches the version in the embedded Dockerfile template).pkg/config/config.go: Addcase 17: c.Db.Image = pg17to theMajorVersionswitch inLoad().Testing
go build ./...passesgo test -short ./...passes (only pre-existing keyring test failure unrelated to this change)Fixes #5007