Expaso/hassos-addon-pgadmin4

pg_dump: error: aborting because of server version mismatch

Closed this issue · 4 comments

Hi There,

How can i solve this?

pg_dump: error: server version: 14.2; pg_dump version: 13.6
pg_dump: error: aborting because of server version mismatch

Both Add-Ons installed:
pgAdmin4
Current version: 2.0.0

TimescaleDB
Current version: 2.0.1

Hi!
It seams you are using PostgreSQL 14, while the version of pg_dump you are using is 13.6.
From where are you usign pg_dump?

Same issue here. Using your pgadmin4 add-on and the version of pg_dumpall etc that is supplies

Hi @Expaso, i'm using timescale addon version 2.1.0 and pgadmin4 addon version 2.1.1 and i've got the same error
i was trying to export the db schema only.
this is the log:

Backing up an object on the server 'homeassistant (77b2833f-timescaledb:5432)' from database 'homeassistant'
Running command:
/usr/local/pgsql-13/pg_dump --file "/root/hassio_backup_schema.sql" --host "77b2833f-timescaledb" --port "5432" --username "shakin" --no-password --verbose --format=p --schema-only --no-tablespaces --schema "public" "homeassistant"
 Start time: Thu Nov 17 2022 09:35:35 GMT+0100 (Ora standard dell’Europa centrale)
pg_dump: error: server version: 14.5; pg_dump version: 13.8
pg_dump: error: aborting because of server version mismatch

it seems the addon is pointing to a wrong directory (pgsql-13) to find pg_dump

For those who are looking for a solution to this problem.
The problem is due to pgAdmin4 configuration and can be simply solved.
You can change the path of default binaries directory in pgAdmin here - File -> Preferences -> Paths -> Binary paths -> PostgreSQL Binary Path. Set it to your PostgreSQL installed binaries. All the binaries then will be picked from this.
Specifically for PostgreSQL 14 the directory to set is /usr/local/pgsql-14
Refer to this link for more info
https://redmine.postgresql.org/issues/5995