postgresql pg_dump:由于服务器版本不匹配而中止
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/45051633/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
pg_dump: aborting because of server version mismatch
提问by Naveen Kumar
I am running ubuntu 14.04. while backing up a database on postgreSQL i am following error:
我正在运行 ubuntu 14.04。在 postgreSQL 上备份数据库时出现以下错误:
/usr/bin/pg_dump --host 127.0.0.1 --port 5432 --username "postgres" --no-password --format custom --section pre-data --section data --section post-data --verbose --file "/home/naveen/consumerDB/CONSUMER_DB" "CONSUMER_DB"
pg_dump: server version: 9.4.8; pg_dump version: 9.3.17
pg_dump: aborting because of server version mismatch
Process returned exit code 1.
Can anyone please help. I tried many other stack overflow links but nothing seems to be working.
任何人都可以请帮忙。我尝试了许多其他堆栈溢出链接,但似乎没有任何效果。
回答by Craig Ringer
The error message seems fairly clear. pg_dump
for PostgreSQL 9.3 won't dump a PostgreSQL 9.4 database. Maybe you need to run pg_dump
from PostgreSQL 9.4?
错误信息似乎相当清楚。pg_dump
对于 PostgreSQL 9.3 不会转储 PostgreSQL 9.4 数据库。也许您需要pg_dump
从 PostgreSQL 9.4运行?
If you installed both from packages you'll be using pg_wrapper
and should use Debian/Ubuntu's update-alternatives
to change pg_dump
to point to 9.4's pg_dump
. Or run it via the direct path to the actual binary.
如果您从将要使用的软件包中安装了这两个软件包,pg_wrapper
并且应该使用 Debian/Ubuntu 将update-alternatives
其更改pg_dump
为指向 9.4 的pg_dump
. 或者通过实际二进制文件的直接路径运行它。