Re: pg_restore taking 4 hours!

Vivek Khera <khera@kcilink.com>

From: Vivek Khera <khera@kcilink.com>
To: pgsql-performance@postgresql.org
Date: 2004-12-13T16:37:28Z
Lists: pgsql-performance
>>>>> "RC" == Rodrigo Carvalhaes <grupos@carvalhaes.net> writes:

RC> Hi!
RC> I am using PostgreSQL with a proprietary ERP software in Brazil. The
RC> database have around 1.600 tables (each one with +/- 50 columns).
RC> My problem now is the time that takes to restore a dump. My customer
RC> database have arount 500mb (on the disk, not the dump file) and I am
RC> making the dump with pg_dump -Fc, my dumped file have 30mb. To make
RC> the dump, it's taking +/- 1,5 hours BUT to restore (using pg_restore )
RC> it it takes 4 - 5 hours!!!

I regularly dump a db that is compressed at over 2Gb.  Last time I did
a restore on the production box it took about 3 hours.  Restoring it
into a development box with a SATA RAID0 config takes like 7 hours or
so.

The biggest improvement in speed to restore time I have discovered is
to increase the checkpoint segments.  I bump mine to about 50.  And
moving the pg_xlog to a separate physical disk helps a lot there, too.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@kciLink.com       Rockville, MD  +1-301-869-4449 x806
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/