Bruno Wolff III <bruno@wolff.to> writes:
>> psql dbname < dump_file
>> pg_restore -d test_restore_2 -Fc niehs_dump.backup
> Some things you can do are to turn off fsync for the restore and not
> restore foreign key contsraints and indexes until after the database
> has been loaded.
pg_dump/pg_restore should get the ordering considerations right already.
fsync off might help some but I'm not convinced of it. I'd look at the
value of maintenance_work_mem --- increasing that to maybe a few hundred
Mb would help the speed of index builds and foreign key checks.
But really what you ought to do first is find out where it's spending
its time. Can you run the restore with query logging and duration
logging enabled?
regards, tom lane