Monday, February 21, 2022

[SOLVED] How to upgrade pg_dumpall

Issue

I am trying to migrate from Postgres 9.3 to 9.4, and I would like to run:

pg_dumpall > outfile.sql

But, I keep getting this error:

server version: 9.3.10; pg_dumpall version: 9.2.13
aborting because of server version mismatch

I found pg_dumpall here: /usr/bin/pg_dumpall

I found an answer saying to do this:

sudo ln -s /usr/lib/postgresql/9.3/bin/pg_dump /usr/bin/pg_dump --force

But in Centos, this is the output for this directory:

sudo ls /var/lib/pgsql/9.3

Output:

backups data initdb.log

Does anyone know how to upgrade pg_dumpall to match the postgres version in Centos 7?


Solution

CentOS has its own disk layout. I'd expect your 9.3 pg_dump will be in:

/usr/pgsql-9.3/bin/pg_dump

You can look for pg_dump files on your filesystem with:

find / -name pg_dump -executable -print


Answered By - Andomar
Answer Checked By - Mildred Charles (WPSolving Admin)