i have taken a backup of a postgresql db from a system1 using pgadmin3 tool. The backup file created is of extension ".backup"
I am trying to restore it on an another system2 installed with postgresql 9.0 and pgadmin3 1.8 but iam getting the error
could not execute query: ERROR: unrecognized configuration parameter "lock_timeout" Command was: SET lock_timeout = 0;
configuration of both the systems
system1 win7-64bit postgresql 9.0.13-1 - 64bit pgadmin 1.8
system2 win7-32bit postgresql 9.0.13-1 - 32bit pgadmin 1.8
1 Answer 1
lock_timeout
is a new parameter that appeared with PostgreSQL 9.3
Per the release notes:
Add configuration variable lock_timeout to allow limiting how long a session will wait to acquire any one lock (Zoltán Böszörményi)
That would indicate that pgadmin is using a PostgreSQL 9.3 pg_dump
command to take the backup, instead of 9.0.
This is recommended only when migrating to 9.3. Since the target server is 9.0, better use the pg_dump
binary that has been installed with the 9.0 server.
The path of external binaries can be set in pgAdmin preferences. To fix the problem, you may set it to the bin directory of your 9.0 installation and try to backup again.
Other than that, as a one-time fix you may edit the dump file if it's in plain text, remove the offending line SET lock_timeout = 0;
in the hope that it's the only problem caused by the version mismatch.
-
1Oddly, I get this same error even with a 9.3 source and destination database...Cerin– Cerin2014年05月14日 16:51:41 +00:00Commented May 14, 2014 at 16:51
-
I'm getting this error with a db backed up from heroku and restoring on new local 9.3 db. Does it matter?justingordon– justingordon2014年07月08日 19:40:46 +00:00Commented Jul 8, 2014 at 19:40
-
1I can't get this parameter in all files of backup, but still restore report me the same error. I got dump on 9.3 postgresql and I try to restore on 9.2 postgresql. I think there is some option create automatically this lock_timeout parameters?g.annunziata– g.annunziata2015年01月12日 17:27:20 +00:00Commented Jan 12, 2015 at 17:27