Skip to content

Commit

Permalink
Parallelized restore process for faster times
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Kerstiens committed Sep 18, 2012
1 parent 9b15f84 commit fdd2ef9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init.rb
Expand Up @@ -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)
Expand Down

1 comment on commit fdd2ef9

@hgmnz
Copy link
Contributor

@hgmnz hgmnz commented on fdd2ef9 Sep 21, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.