Re: pg_restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: D Kavan <bitsandbytes88(at)hotmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_restore
Date: 2005-08-11 21:56:15
Message-ID: 24171.1123797375@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Bruno Wolff III <bruno(at)wolff(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message eko oke 2005-08-12 02:54:06 user postgres
Previous Message Bruno Wolff III 2005-08-11 20:46:03 Re: pg_restore