How to fix pg_dump version mismatch on Linux

Posted on 03-07-2013 09:01 by graham
If you try to run pg_dump and get the following exception:
pg_dump: server version: 9.2.2; pg_dump version: 8.1.22
pg_dump: proceeding despite version mismatch
pg_dump: SQL command failed

This is usually caused by the fact that pg_dump that one version of pg_dump is shipped with the OS and another one with your Postgres installation. And evidently what you are trying to run is the OS version that is not compatible with your Postgres version. To do this, first locate the proper installation of pg_dump:
locate pg_dump

and then run it, referencing the full path:
/usr/pgsql-9.2/bin/pg_dump -i -h localhost --username=orgstats orgstats > orgstats-db.3.07.2013.backup
Thank you so much!!!!!!!!!!!!!
Added on 20-05-2014 09:25 by anonymous


Add comment

Has this tutorial been helpful to you? Or do you see anything wrong? We appreciate your opinion!
Your comment:
Show formatting hints
HTML is disallowed, but in your text you can use the following markup
  • [code][/code] for a block of code
  • [tt][/tt] for inline code
  • [link]link href|link anchor[/link] for links
  • [b][/b] for bold text
+ Ask a question
If you have a technical question related to programming and computers, ask it here. Other users will help you solve it!
Unanswered questions
Share your knowledge by helping others solve their problems