简体   繁体   English

无法摆脱Lion OSX上的以下错误“ pg_dump:由于服务器版本不匹配而中止”

[英]Cannot get rid of following error “pg_dump: aborting because of server version mismatch” on Lion OSX

I am trying to download the dump of a database on Heroku in the following way: 我正在尝试通过以下方式在Heroku上下载数据库的转储:

pg_dump dc6psqngs8h580 -h url_address -U user_name> db.sql

but I am getting this error all the time: 但是我一直都遇到这个错误:

pg_dump: server version: 9.2.4; pg_dump version: 9.1.5
pg_dump: aborting because of server version mismatch

I found topics with this error here on SO, but none of them helped me out with this issue. 我在SO上发现了与此错误有关的主题,但是没有一个人帮助我解决了这个问题。 I added: 我补充说:

PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"

into ~/.profile , also I added ~/.profile ,我也添加了

export PATH=/Applications/Postgres.app/Contents/MacOS/bin:$PATH

into ~/.bash_profile , but none of these helped me to successfully download the dump. ~/.bash_profile ,但是这些都没有帮助我成功下载转储。

Where can be yet the problem and how to fix it? 问题又在哪里,以及如何解决?

Thank you very much 非常感谢你

Install PostgreSQL 9.2.x whether by homebrew, from source, or some other means. 可以通过自制程序,源代码或其他方式安装PostgreSQL9.2.x。

Basically you can dump an older server with a newer version of the dump file, but not the other way around. 基本上,您可以使用较新版本的转储文件来转储旧服务器,但反之则不行。 This exists to ensure that newer features of the db are not ignored in the dump and there are no command line switches to get around the error. 这样做是为了确保在转储中不忽略数据库的新功能,并且没有命令行开关可以解决该错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM