我收到以下错误:
pg_restore: [archiver (db)] Error while INITIALIZING:
pg_restore: [archiver (db)] could not execute query: ERROR: unrecognized configuration parameter "idle_in_transaction_session_timeout"
命令是:SET idle_in_transaction_session_timeout = 0;
当我尝试使用恢复数据时
pg_restore -h 172.16.0.70 -U postgres -d newdb05aug19 -1 dirfrmt;
postgres 版本是 PostgreSQL 9.3.23
pg_dump 版本是 pg_dump (PostgreSQL) 9.3.23
pg_restore 版本是 pg_restore (PostgreSQL) 9.3.23
那是用来生成“dirfmrt”目录的程序吗?如果备份文件来自其他地方,那么您在本地安装的 pg_dump 并不重要。
被转储的正在运行的 postgresql 服务器的版本,以及用于转储它的 pg_dump 的版本,都包含在转储中。您可以使用以下方式查看它们(作为评论):
虽然您可能在系统某处安装了该版本的 pg_restore,但它似乎并不是您实际用于进行恢复的版本。是否
SET idle_in_transaction_session_timeout = 0;
发出取决于使用的 pg_restore 版本,9.3 不发出。