Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 5DE0B1337BB7 for ; Sat, 30 Apr 2011 11:34:31 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 97878-02 for ; Sat, 30 Apr 2011 14:34:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by mail.postgresql.org (Postfix) with ESMTP id AD2651337BBB for ; Sat, 30 Apr 2011 11:34:23 -0300 (ADT) Received: from mh3.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh3.mail.rice.edu (Postfix) with ESMTP id 0D5C728F8A5; Sat, 30 Apr 2011 09:34:23 -0500 (CDT) X-Virus-Scanned: by amavis-2.6.4 at mh3.mail.rice.edu, auth channel Received: from mh3.mail.rice.edu ([127.0.0.1]) by mh3.mail.rice.edu (mh3.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id TOQJFBXqTaX6; Sat, 30 Apr 2011 09:34:22 -0500 (CDT) X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.is.rice.edu (aart.is.rice.edu [168.7.56.48]) by mh3.mail.rice.edu (Postfix) with ESMTP id C9B1228F882; Sat, 30 Apr 2011 09:34:22 -0500 (CDT) Received: by aart.is.rice.edu (Postfix, from userid 18612) id 0F0682D5A6; Sat, 30 Apr 2011 09:34:21 -0500 (CDT) Date: Sat, 30 Apr 2011 09:34:21 -0500 From: Kenneth Marshall To: Phoenix Kiula Cc: Greg Smith , pgsql-performance@postgresql.org Subject: Re: REINDEX takes half a day (and still not complete!) Message-ID: <20110430143421.GA26488@aart.is.rice.edu> References: <34CE0668-2A83-4BE4-B191-86871C2F8334@gmail.com> <4DBBC331.7080200@2ndQuadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/434 X-Sequence-Number: 43496 On Sat, Apr 30, 2011 at 05:26:36PM +0800, Phoenix Kiula wrote: > On Sat, Apr 30, 2011 at 4:07 PM, Greg Smith wrote: > > On 04/23/2011 03:44 PM, Robert Haas wrote: > >> > >> On Apr 17, 2011, at 11:30 AM, Phoenix Kiula > >> ?wrote: > >> > >>> > >>> Postgres is 8.2.9. > >>> > >>> > >> > >> An upgrade would probably help you a lot, and as others have said it > >> sounds like your hardware is failing, so you probably want to deal with that > >> first. > >> > >> I am a bit surprised, however, that no one seems to have mentioned using > >> CLUSTER rather than VACUUM or REINDEX. Sometimes that's worth a try... > >> > > > > Don't know if it was for this reason or not for not mentioning it by others, > > but CLUSTER isn't so great in 8.2. ?The whole "not MVCC-safe" bit does not > > inspire confidence on a production server. > > > > > To everyone. Thanks so much for everything, truly. We have managed to > salvage the data by exporting it in bits and pieces. > > 1. First the schema only > 2. Then pg_dump of specific small tables > 3. Then pg_dump of timed bits of the big mammoth table > > Not to jinx it, but the newer hardware seems to be doing well. I am on > 9.0.4 now and it's pretty fast. > > Also, as has been mentioned in this thread and other discussions on > the list, just doing a dump and then fresh reload has compacted the DB > to nearly 1/3rd of its previously reported size! > > I suppose that's what I am going to do on a periodic basis from now > on. There is a lot of DELETE/UPDATE activity. But I wonder if the > vacuum stuff really should do something that's similar in function? > What do the high-end enterprise folks do -- surely they can't be > dumping/restoring every quarter or so....or are they? > > Anyway, many many thanks to the lovely folks on this list. Much appreciated! > The autovacuum and space management in 9.0 is dramatically more effective and efficient then that of 8.2. Unless you have an odd corner-case there really should be no reason for a periodic dump/restore. This is not your grandmother's Oldsmobile... :) Regards, Ken