Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id B67C39FB3F0 for ; Thu, 22 Feb 2007 16:47:47 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 72243-01 for ; Thu, 22 Feb 2007 16:47:31 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by postgresql.org (Postfix) with ESMTP id 7C1469FB39B for ; Thu, 22 Feb 2007 16:47:39 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so194541ugf for ; Thu, 22 Feb 2007 12:47:38 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=p6+kfvft0sYSvCAArQ4MJQrsKDk7MrPNCiu0eQfTh76o1bBfxhl1v7ohj5ahfbN0O4E8XLkwfjAkIH1GaXFQaoIN9XXtjwH9GgDGmL/WWDj7HTmpeHyBCveLeb6LTPpXPiS94p0mSBG1c92+5WS8f3T4P+m0sRrXB/raEV9FqAQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oEkF8waOgopjc/kr95Oew/oFHwyreHJOdF174RKhbLFKvI9mmAQIt7OT6DVP6laUMCBBood2a5xCZTWgTDdRePmJAwpJQlEtNBjAGbluAYwEjuWe6ohhqhLQm3wre4Xb4K7mCkNzOJNgbx1Y6YQHd5J98NtGoSQWsu+d9peWF90= Received: by 10.78.20.13 with SMTP id 13mr93404hut.1172177257940; Thu, 22 Feb 2007 12:47:37 -0800 (PST) Received: by 10.78.68.17 with HTTP; Thu, 22 Feb 2007 12:47:37 -0800 (PST) Message-ID: <3f0d61c40702221247t14229abfx16ddfbe50a288e42@mail.gmail.com> Date: Thu, 22 Feb 2007 21:47:37 +0100 From: "Marco Bizzarri" To: "ogjunk-pgjedan@yahoo.com" Subject: Re: Fastest DB restore options Cc: pgsql-admin@postgresql.org In-Reply-To: <821429.69798.qm@web50304.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <821429.69798.qm@web50304.mail.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/299 X-Sequence-Number: 24764 On 2/22/07, ogjunk-pgjedan@yahoo.com wrote: > Hello, > > I have a fairly large DB to dump and restore as fast as possible. I'm moving from 8.0.3 to 8.2.3! :) > > I normally dump with these options: > > -d MyDB --clean --inserts --column-inserts --format=P > > But the last time I tried that, the restore took foreeeeeeeeeeeeeever. So I'm looking for the fastest way to import data from the old DB to the new one. Judging from pg_dump man page the following should be the fastest dump & restore: > > -d MyDB --format=c --ignore-version > > Is there anything else I can do to make the restore as fast as possible? > > Thanks, > Otis I'm not sure it is advisable, or it is even faster in current implementation. In older ones, if you configure postgresql not to sync after each write, you could end in a faster restore. Since this is a restore, after all, if lights goes out, you can always throw all away and start from scratch... Regards Marco -- Marco Bizzarri http://iliveinpisa.blogspot.com/