Re: pg_restore taking 4 hours!

From: Vivek Khera <khera(at)kcilink(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: pg_restore taking 4 hours!
Date: 2004-12-13 16:37:28
Message-ID: x73byab1dj.fsf@yertle.int.kciLink.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

>>>>> "RC" == Rodrigo Carvalhaes <grupos(at)carvalhaes(dot)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(at)kciLink(dot)com Rockville, MD +1-301-869-4449 x806
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2004-12-13 16:37:45 Re: table with sort_key without gaps
Previous Message Hans-Michael Stahl 2004-12-13 16:36:16 "Complex" data types like BYTEA in embedded SQL with ecpg

Browse pgsql-performance by date

  From Date Subject
Next Message Vivek Khera 2004-12-13 16:47:34 Re: Alternatives to Dell?
Previous Message Vivek Khera 2004-12-13 16:33:47 Re: Hardware purchase question