Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

share|improve this question
add comment

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.

share|improve this answer
    
Oddly, I get this same error even with a 9.3 source and destination database... –  Cerin May 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 at 19:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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