I did a pg_dump of a database and am now trying to install the resulting .sql file on to another server.
I\'m using the following command.
psql -f databa
Why are you producing a raw .sql dump? The opening description of pg_dump recommends the "custom" format -Fc
.
Then you can use pg_restore which will restore your data (or selected parts of it). There is a "number of jobs" option -j
which can use multiple cores (assuming your disks aren't already the limiting factor). In most cases, on a modern machine you can expect at least some gains from this.
Now you say "I don't know how long this is supposed to take". Well, until you've done a few restores you won't know. Do monitor what your system is doing and whether you are limited by cpu or disk I/O.
Finally, the configuration settings you want for restoring a database are not those you want to run it. A couple of useful starters:
Do remember to reset them after the restore though.