Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3CA8B1337B58 for ; Sun, 28 Nov 2010 12:23:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 89660-02 for ; Sun, 28 Nov 2010 16:23:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from depesz.com (martin.depesz.com [188.40.39.14]) by mail.postgresql.org (Postfix) with ESMTP id 93D641336FA7 for ; Sun, 28 Nov 2010 12:23:33 -0400 (AST) Received: from martin.depesz.com ([188.40.39.14] helo=depesz.com) by depesz.com with esmtpa (Exim 4.69) (envelope-from ) id 1PMk2F-0003Z7-Kp; Sun, 28 Nov 2010 17:23:31 +0100 Date: Sun, 28 Nov 2010 17:23:31 +0100 From: hubert depesz lubaczewski To: Bala Murugan Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #5774: VACCUM & REINDEX kills production environement Message-ID: <20101128162331.GA11758@depesz.com> Reply-To: depesz@depesz.com References: <201011280725.oAS7PqUN022602@wwwmaster.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201011280725.oAS7PqUN022602@wwwmaster.postgresql.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/193 X-Sequence-Number: 28773 On Sun, Nov 28, 2010 at 07:25:52AM +0000, Bala Murugan wrote: > > The following bug has been logged online: > > Bug reference: 5774 > Logged by: Bala Murugan > Email address: b2m@a-cti.com > PostgreSQL version: 8.3.7 > Operating system: openSUSE 10.3 (X86-64) - Kernel \r (\l). > Description: VACCUM & REINDEX kills production environement > Details: > > Iam running postgres 8.3 version for more than 2 yrs on Amazon EC2 Instance, > in recent days Vaccum and reindex make the application down for more than > 2hrs. I am not sure this because of my configuration or postgres. is it normal vacuum? or are you using "vacuum full"? generally - voth vacuum full and reindex do lock tables for exclusive access. that's why you generally don't use them! vacuum full is especially frowned upon. as for reindex - if you *really* need it (are you sure? what makes you think you need it), then there are ways to do reindex without actually using "reindex" command, which are mostly transparent for users, but you should check if you really need to run reindex at all. Best regards, depesz -- Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/ jid/gtalk: depesz@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007