Permalink
Browse files

Parallelized restore process for faster times

  • Loading branch information...
1 parent 9b15f84 commit fdd2ef9619b92128d37825891579afaeadded2c6 @craigkerstiens craigkerstiens committed Sep 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 init.rb
View
2 init.rb
@@ -68,7 +68,7 @@ def pg_restore_command(url)
host = uri.host || "localhost"
port = uri.port || "5432"
user = uri.user ? "-U #{uri.user}" : ""
- %{ env PGPASSWORD=#{uri.password} pg_restore --verbose --clean --no-acl --no-owner #{user} -h #{host} -d #{database} -p #{port} }
+ %{ env PGPASSWORD=#{uri.password} pg_restore --verbose --clean --no-acl -j 3 --no-owner #{user} -h #{host} -d #{database} -p #{port} }
end
def transfer_pretty_name(db_name)

1 comment on commit fdd2ef9

@hgmnz

this breaks transfers from a heroku database to a local one:

pg_dump: dumping contents of table foobar
... snip ...
pg_restore: [custom archiver] parallel restore from stdin is not supported
pg_restore: *** aborted because of error 
Please sign in to comment.