Skip to content
ReviveDB
Blog

pg_dump: "aborting because of server version mismatch" on Supabase

By ReviveDB

pg_dump: error: aborting because of server version mismatch
pg_dump: detail: server version: 17.6; pg_dump version: 15.14

pg_dump can dump a server of its own major version or older, never newer. New Supabase projects run Postgres 17, while the pg_dump on many machines and CI images is still 14 or 15.

Check both versions

pg_dump --version
psql "<connection string>" -c "show server_version;"

The first number is the major version. pg_dump has to be at least as high as the server.

Install a matching pg_dump

On macOS with Homebrew:

brew install postgresql@17
/opt/homebrew/opt/postgresql@17/bin/pg_dump --version

On Debian or Ubuntu, from the PostgreSQL apt repository:

sudo apt-get install postgresql-client-17

In GitHub Actions, the runner image ships an older client. Install postgresql-client-17 from the PostgreSQL apt repository in a step before the dump, or run pg_dump from the postgres:17 Docker image.

The Supabase CLI avoids the question: supabase db dump runs pg_dump in a container that matches your project. The CLI backup guide shows the commands.

A newer pg_dump is fine

pg_dump 18 can dump a Postgres 17 server. The other direction matters when you restore: a dump made with a newer pg_dump can contain statements an older server does not understand, so restore with a server of the same major version as the source or newer.