Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9E1332E0172 for ; Tue, 19 Feb 2008 15:31: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 56956-02-6 for ; Tue, 19 Feb 2008 15:31:14 -0400 (AST) Received: from hunley.homeip.net (hunley.homeip.net [69.12.222.146]) by postgresql.org (Postfix) with ESMTP id 110942E0293 for ; Tue, 19 Feb 2008 15:20:35 -0400 (AST) Received: from douglas.hunley.homeip.net (d60-34-189.col.wideopenwest.com [65.60.189.34]) (authenticated bits=0) by hunley.homeip.net (8.13.1/8.13.1) with ESMTP id m1JJKIbx023597 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 19 Feb 2008 14:20:26 -0500 From: Douglas J Hunley To: Jeff Davis Subject: Re: 7 hrs for a pg_restore? Date: Tue, 19 Feb 2008 14:20:11 -0500 User-Agent: KMail/1.9.7 Cc: pgsql-performance@postgresql.org References: <200802191303.58840.doug@hunley.homeip.net> <1203445403.3846.86.camel@dogma.ljc.laika.com> In-Reply-To: <1203445403.3846.86.camel@dogma.ljc.laika.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802191420.11347.doug@hunley.homeip.net> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (hunley.homeip.net [69.12.222.146]); Tue, 19 Feb 2008 14:20:27 -0500 (EST) X-Virus-Scanned: ClamAV version 0.92.1, clamav-milter version 0.92.1 on hunley.homeip.net X-Virus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL=0.006 X-Spam-Level: X-Archive-Number: 200802/221 X-Sequence-Number: 28763 On Tuesday 19 February 2008 13:23:23 Jeff Davis wrote: > 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. > that could be a factor here. It is a UNICODE db, and we do a lot of text-based indexing for the application -- Douglas J Hunley (doug at hunley.homeip.net) - Linux User #174778 http://doug.hunley.homeip.net Be courteous to everyone, friendly to no one.