pg_restore无法加载转储

时间:2017-06-27 00:55:29

标签: postgresql

帮助!突然之间,我在尝试从转储中恢复本地数据库时遇到此错误:

$ pg_restore --no-acl --no-owner --dbname my_db tmp/latest.dump
pg_restore: [archiver (db)] Error while INITIALIZING:
pg_restore: [archiver (db)] could not execute query: ERROR:  unrecognized configuration parameter "idle_in_transaction_session_timeout"
Command was: SET idle_in_transaction_session_timeout = 0;

在本地,我正在运行postgresql 9.6.3。转储来自运行9.4的服务器。由于此命令停止工作,因此我的机器没有已知的配置更改。

据我所知,idle_in_transaction_session_timeout是在9.6中引入的,但我仍然可以加载9.4生成的转储。那是什么给出了什么?

1 个答案:

答案 0 :(得分:4)

问题是您使用PostgreSQL 9.6中的pg_dump来创建9.4数据库的转储。

如果要创建可以加载到9.4数据库的转储,请使用PostgreSQL 9.4中的pg_dump

相关问题