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


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.

  • 1
    Oddly, I get this same error even with a 9.3 source and destination database... – Cerin May 14 '14 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 Jul 8 '14 at 19:40
  • 1
    I 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 Jan 12 '15 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.