. Advertisement .
..3..
. Advertisement .
..4..
I am tired of fixing the problem: pg_dump: aborting because of server version mismatch in the sql; even if I get the reference from another forum, it still returns an error:
*** Start Block ***
pg_dump: server version: 9.2.1; pg_dump version: 9.1.6
pg_dump: aborting because of server version mismatch
To identify the problem, I will show you the detail here:
$ pg_dump books > books.out
How do I do that? Could you support me in improving this problem?
The cause: This error happens when PostgreSQL is upgraded.
The solution: You have the option of installing PostgreSQL 9.2.1 on the
pg_dump
client system or just copying the$PGHOME
from the PostgreSQL server machine to the client machine. It’s important to note that there’s no need toinitdb
a new cluster on the client PC.Remember to edit several environment variables in your
.bash_profile
file after you’ve done installing the 9.2.1 software.This happened to me while using Heroku Ubuntu. Here’s how I fixed it.
As described in ” Linux downloads (Ubuntu),“, you can add the PostgreSQL-apt repository. There are pages similar to this for other operating systems.
Upgrade to the most recent version (9.5 for me)
Create the symbolic link in
/usr/bin
using:The
/usr/lib/postgresql/...
version number should match theserver version
error number. If your error statespg_dump: server version: 9.9
, link to/usr/lib/postgresql/9.9/...