Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id A842E9FA49E for ; Thu, 21 Dec 2006 01:47:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 03866-05 for ; Thu, 21 Dec 2006 01:47:45 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 5E7279FA2EC for ; Thu, 21 Dec 2006 01:47:46 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kBL5lijr014150; Thu, 21 Dec 2006 00:47:44 -0500 (EST) To: joe.mcclintock@antics.com cc: pgsql-admin@postgresql.org Subject: Re: Very Very Slow Database Restore In-reply-to: <1166646860.3941.4.camel@mcclintock.anticsoffline.com> References: <1166646860.3941.4.camel@mcclintock.anticsoffline.com> Comments: In-reply-to Joseph McClintock message dated "Wed, 20 Dec 2006 12:34:20 -0800" Date: Thu, 21 Dec 2006 00:47:44 -0500 Message-ID: <14149.1166680064@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/284 X-Sequence-Number: 24076 Joseph McClintock writes: > Now our database has grown and the pg_dump give me a 2.1 GB file which > is taking 12 hours or more to restore, Yickes! I've tried compressing > the dump file: Compressing the dump file will make the restore slower, most likely, because of the extra CPU effort to decompress. It certainly won't create any great savings. > The database configuration is pretty much out of the box. You probably want to increase maintenance_work_mem (to speed index creation) and checkpoint_segments (general rule for any update-intensive situation) ... and for 8.0 you'd maybe need larger shared_buffers etc. The postgresql techdocs website has lots of general advice about parameter settings --- the only thing specific to restore is you want high maintenance_work_mem. regards, tom lane