Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 52FDB2E006C for ; Tue, 19 Feb 2008 14:25:18 -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 22912-01 for ; Tue, 19 Feb 2008 14:25:15 -0400 (AST) Received: from serv01.siteground137.com (ns1.siteground137.com [67.15.250.10]) by postgresql.org (Postfix) with ESMTP id 2B3212E00E0 for ; Tue, 19 Feb 2008 14:23:27 -0400 (AST) Received: from cragnux.laika.com ([209.162.219.253]:55247 helo=dogma.ljc.laika.com) by serv01.siteground137.com with esmtpa (Exim 4.68) (envelope-from ) id 1JRX7m-0001T4-84; Tue, 19 Feb 2008 12:23:26 -0600 Subject: Re: 7 hrs for a pg_restore? From: Jeff Davis To: Douglas J Hunley Cc: pgsql-performance@postgresql.org In-Reply-To: <200802191303.58840.doug@hunley.homeip.net> References: <200802191303.58840.doug@hunley.homeip.net> Content-Type: text/plain Date: Tue, 19 Feb 2008 10:23:23 -0800 Message-Id: <1203445403.3846.86.camel@dogma.ljc.laika.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-7) Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - serv01.siteground137.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - j-davis.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/217 X-Sequence-Number: 28759 On Tue, 2008-02-19 at 13:03 -0500, 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. > Are there lots of indexes on localized text attributes? If you have a big table with localized text (e.g. en_US.UTF-8), it can take a long time to build the indexes. If the file is 5GB compressed, I wouldn't be surprised if it took a long time to restore. Keep in mind, if you have several GB worth of indexes, they take up basically no space in the logical dump (just the "CREATE INDEX" command, and that's it). But they can take a lot of processor time to build up again, especially with localized text. Regards, Jeff Davis