Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 0BD4C2E0046 for ; Tue, 19 Feb 2008 14:13:43 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 17010-01-5 for ; Tue, 19 Feb 2008 14:13:40 -0400 (AST) Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by postgresql.org (Postfix) with ESMTP id 94CAC2E004F for ; Tue, 19 Feb 2008 14:13:38 -0400 (AST) Received: from [84.51.143.99] (helo=server3.office.archonet.com) by ptb-relay03.plus.net with esmtp (Exim) id 1JRWyH-00062j-2u; Tue, 19 Feb 2008 18:13:37 +0000 Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id D4ABF274059; Tue, 19 Feb 2008 18:13:36 +0000 (GMT) Message-ID: <47BB1C51.6010203@archonet.com> Date: Tue, 19 Feb 2008 18:13:37 +0000 From: Richard Huxton User-Agent: Thunderbird 2.0.0.9 (X11/20071031) MIME-Version: 1.0 To: Douglas J Hunley CC: pgsql-performance@postgresql.org Subject: Re: 7 hrs for a pg_restore? References: <200802191303.58840.doug@hunley.homeip.net> In-Reply-To: <200802191303.58840.doug@hunley.homeip.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Plusnet-Relay: dde40e0b44996072e34d65d8958f62fb X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/214 X-Sequence-Number: 28756 Douglas J Hunley wrote: > I spent a whopping seven hours restoring a database late Fri nite for a > client. We stopped the application, ran pg_dump -v -Ft -b -o $db > > ~/pre_8.3.tar on the 8.2.x db, and then upgrading the software to 8.3. I then > did a pg_restore -v -d $db ./pre_8.3.tar and watched it positively crawl. > I'll grant you that it's a 5.1G tar file, but 7 hours seems excessive. Depends, both on the machine and the database. What sort of disk i/o are you seeing, what's the cpu(s) doing, and what's the restore taking so long over (since you have -v)? Oh, and have you tweaked the configuration settings for the restore? Lots of work_mem, turn fsync off, that sort of thing. -- Richard Huxton Archonet Ltd