Describe the bug
supabase db dump fails 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: internal/utils/config.go Load() switch only handles case 13, case 14, case 15 — there is no case 17. The Image field is tagged toml:"-" so users cannot override it via config.toml. The Validate() function accepts case 15, 17: as valid, so major_version = 17 is accepted in config — it just never assigns the correct Docker image.
The PG 17 Docker image (supabase/postgres:17.6.1.095) already exists on ECR and is referenced in the main branch Dockerfile, but it's not wired into config.go.
To Reproduce
- Have a Supabase project running PostgreSQL 17
- Set
major_version = 17 in supabase/config.toml
- Run
supabase db dump
- Error:
pg_dump: error: aborting because of server version mismatch
server version: 17.6; pg_dump version: 15.6
Expected behavior
db dump should use a Docker image with pg_dump 17.x when major_version = 17 is configured, matching the remote server version.
Screenshots
N/A
System information
- Ticket ID: f08c1ad7d1624aeb8aa21b9cfe1debfd
- Version of OS: macOS 26.4
- Version of CLI: v2.84.5
- Version of Docker: v29.0.1
- Versions of services: N/A (remote-only, not using local dev)
Additional context
Describe the bug
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:
internal/utils/config.goLoad()switch only handlescase 13,case 14,case 15— there is nocase 17. TheImagefield is taggedtoml:"-"so users cannot override it viaconfig.toml. TheValidate()function acceptscase 15, 17:as valid, somajor_version = 17is accepted in config — it just never assigns the correct Docker image.The PG 17 Docker image (
supabase/postgres:17.6.1.095) already exists on ECR and is referenced in themainbranch Dockerfile, but it's not wired intoconfig.go.To Reproduce
major_version = 17insupabase/config.tomlsupabase db dumppg_dump: error: aborting because of server version mismatchserver version: 17.6; pg_dump version: 15.6Expected behavior
db dumpshould use a Docker image with pg_dump 17.x whenmajor_version = 17is configured, matching the remote server version.Screenshots
N/A
System information
Additional context
config.gosource references:Load()image switch: https://github.com/supabase/cli/blob/main/internal/utils/config.go (search forcase 15:in theDbImage/ major version switch)Validate()accepts 17: https://github.com/supabase/cli/blob/main/internal/utils/config.go (searchcase 15, 17:)Imagefield: taggedtoml:"-"— not user-configurablePg17Imageconstant toconstants.goand acase 17:branch inLoad()db diffwith local PG 17 vs remote PG 15)