简体   繁体   English

来自pgadmin3的pg_restore错误 - Postgresql

[英]pg_restore error from pgadmin3 - Postgresql

I have taken a backup of a Postgresql db from a system1 using pgadmin3 tool. 我使用pgadmin3工具从system1备份了Postgresql数据库。 The backup file created is of extension ".backup" 创建的备份文件扩展名为“.backup”

I am trying to restore it on an another system2 installed with postgresql 9.0 and pgadmin3 1.8 But I am getting the error: 我试图在另一个安装了postgresql 9.0和pgadmin3 1.8的system2上恢复它但是我收到错误:

could not execute query: ERROR: unrecognized configuration parameter "lock_timeout" Command was: SET lock_timeout = 0; 无法执行查询:错误:无法识别的配置参数“lock_timeout”命令为:SET lock_timeout = 0;

Configuration of both the systems: 两个系统的配置:

system1 win7-64bit postgresql 9.0.13-1 - 64bit pgadmin 1.8 system1 win7-64bit postgresql 9.0.13-1 - 64bit pgadmin 1.8

system2 win7-32bit postgresql 9.0.13-1 - 32bit pgadmin 1.8 system2 win7-32​​bit postgresql 9.0.13-1 - 32bit pgadmin 1.8

By default, pgAdmin uses it's own binaries, which in this case may be higher (or lower) than the version of PostgreSQL you're working with. 默认情况下,pgAdmin使用它自己的二进制文件,在这种情况下,它可能比您正在使用的PostgreSQL版本更高(或更低)。 You can configure pgAdmin to use the binaries from a local installation of PostgreSQL, if your database is local. 如果数据库是本地数据库,则可以将pgAdmin配置为使用PostgreSQL本地安装中的二进制文件。 If the database you are working with is remote, you may consider installing a copy of that version of PostgreSQL locally, so you can use the binaries. 如果您使用的数据库是远程的,您可以考虑在本地安装该版本的PostgreSQL的副本,以便您可以使用二进制文件。

In Preferences -> Browser -> Binary paths , set the PG bin path to be the path to your local installation of PostgreSQL (or any local install, as long as it is the same version as the database). 首选项 - >浏览器 - >二进制路径中 ,将PG bin路径设置为本地安装PostgreSQL(或任何本地安装,只要它与数据库的版本相同)的路径。

Configuring a new location for the PG binaries is best if you primarily work with a single version of PostgreSQL at a time, and are using the latest pgAdmin. 如果您主要使用单个版本的PostgreSQL,并且使用最新的pgAdmin,则最好为PG二进制文件配置新位置。 However, if you use multiple versions of PostgreSQL simultaneously, using the command line may be better. 但是,如果同时使用多个版本的PostgreSQL,使用命令行可能会更好。 Personally, in that case, I still use pgAdmin to start the restore and let it error out, then use the command line flags that the gui built (which you can find in the log file) to copy and paste into my terminal program (you may have to remove the --no-password flag). 就个人而言,在这种情况下,我仍然使用pgAdmin启动还原并让它出错,然后使用gui构建的命令行标志(可以在日志文件中找到)复制并粘贴到我的终端程序中(你可能必须删除--no-password标志)。

The lock_timeout was introduced in 9.3 . lock_timeout 在9.3引入 This sounds like a problem with pgAdmin. 这听起来像是pgAdmin的问题。 It would be worth reporting as a bug. 作为一个错误报告是值得的。

As a workaround, you might try restoring with a command line client (psql for a text backup, pg_restore for a non-text logical backup). 作为解决方法,您可以尝试使用命令行客户端进行还原(psql用于文本备份,pg_restore用于非文本逻辑备份)。

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

相关问题 pgadmin4的PostgreSQL pg_restore错误显示角色不存在 - PostgreSQL pg_restore error from pgadmin4 showing role doesn't exist pg_restore:[存档]输入文件在使用Pgadmin 4的PostgreSQL中似乎不是有效的存档错误 - pg_restore: [archiver] input file does not appear to be a valid archive error in PostgreSQL using Pgadmin 4 pg_restore:[archiver]输入文件在ubuntu 18.04中使用Pgadmin 4的PostgreSQL中似乎不是有效的存档错误 - pg_restore: [archiver] input file does not appear to be a valid archive error in PostgreSQL using Pgadmin 4 in ubuntu 18.04 如何使用pgadmin3在PostgreSQL中还原数据库? - How to restore database in PostgreSQL with pgadmin3? 使用pg_restore从较新版本的PostgreSQL恢复 - Use pg_restore to restore from a newer version of PostgreSQL “pg_restore”处或附近的 Postgresql 错误语法错误 - Postgresql error syntax error at or near "pg_restore" PostgreSQL 9.1 关于 PLPGSQL 的 pg_restore 错误 - PostgreSQL 9.1 pg_restore error regarding PLPGSQL 将 PostgreSQL pg_restore 性能从 130 小时提高 - Improve PostgreSQL pg_restore Performance from 130 hours 从备份中恢复 postgresql:pg_restore 内存不足错误 - Restoring postgresql from backup: pg_restore running out of memory error pg_restore toc 错误 - pg_restore toc error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM