X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2311752B99 for ; Thu, 11 Aug 2005 18:56:18 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32377-10 for ; Thu, 11 Aug 2005 21:56:16 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id A51BE52A58 for ; Thu, 11 Aug 2005 18:56:14 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j7BLuFbK024172; Thu, 11 Aug 2005 17:56:15 -0400 (EDT) To: Bruno Wolff III Cc: D Kavan , pgsql-admin@postgresql.org Subject: Re: pg_restore In-reply-to: <20050811204603.GA2886@wolff.to> References: <20050811204603.GA2886@wolff.to> Comments: In-reply-to Bruno Wolff III message dated "Thu, 11 Aug 2005 15:46:03 -0500" Date: Thu, 11 Aug 2005 17:56:15 -0400 Message-ID: <24171.1123797375@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200508/150 X-Sequence-Number: 18469 Bruno Wolff III 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