Re: pg_restore - Mailing list pgsql-admin

From Tom Lane
Subject Re: pg_restore
Date
Msg-id 24171.1123797375@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_restore  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: pg_restore
List pgsql-admin
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

pgsql-admin by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: pg_restore
Next
From: eko oke
Date:
Subject: user postgres