Re: Restore of pg_dump taking a long time... - Mailing list pgsql-admin

From Scott Marlowe
Subject Re: Restore of pg_dump taking a long time...
Date
Msg-id 1148497210.25526.22.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: Restore of pg_dump taking a long time...  ("mcelroy, tim" <tim.mcelroy@bostonstock.com>)
List pgsql-admin
On Wed, 2006-05-24 at 13:56, mcelroy, tim wrote:
> I have found that the following steps have increased the speed of my
> restores:
> 1. dropdb <DBNAME>
> 2. createdb <DBANME>
> 3. Increase maintenance_work_mem as Tom mentioned.  I do this at
> restore/runtime
> 4. Increase work_mem as Tom mentioned.  I do this at restore/runtime
> 5. renice -20 -p <pid #> (on a Linux box)  <= This step can be
> performed while the restore is running but you need root privilege

Note that if there's no other data in the database that you need to
worry about, you can also restore with fsync off.  I.e. if a database
cluster could just be re-inited should a power failure occur.

If you've got already important data you can't afford to lose in the
cluster, then do not turn off fsync.

Also, remember to turn it back on before you go into production.

pgsql-admin by date:

Previous
From: "mcelroy, tim"
Date:
Subject: Re: Restore of pg_dump taking a long time...
Next
From: Tom Lane
Date:
Subject: Re: Restore of pg_dump taking a long time...