Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id BA92D9FB36B for ; Thu, 26 Oct 2006 08:03:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 37173-07 for ; Thu, 26 Oct 2006 08:03:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id CE8EA9FB368 for ; Thu, 26 Oct 2006 08:03:16 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1Gd3Lg-0007ko-79 for pgsql-admin@postgresql.org; Thu, 26 Oct 2006 07:24:36 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id E12B14051; Thu, 26 Oct 2006 07:03:09 -0400 (EDT) Date: Thu, 26 Oct 2006 07:03:09 -0400 From: Andrew Sullivan To: pgsql-admin@postgresql.org Subject: Re: Vacuum Problems (locking) Message-ID: <20061026110309.GB4083@phlogiston.dyndns.org> References: <1161806057.2095.154.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1161806057.2095.154.camel@localhost.localdomain> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.24 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/173 X-Sequence-Number: 23476 On Wed, Oct 25, 2006 at 03:54:17PM -0400, Mike Goldner wrote: > Finally, and most important is the blocking. The vacuum duration > reported in the log converts to about 170 minutes. I can track > backwards in the log and the only messages prior to the 6:52am > completion of the vacuum end at 3:57am (almost exactly 170 minutes > prior). > > So, all indications point to postgres blocking all access during the > entire vacuum. The vacuum command you posted doesn't block. I can think of two other explanations: 1. You just didn't have any activity then. Don't throw away this possibility without evidence: I can't count the number of blind alleys I've been down because someone insisted that "never happens". 2. You're completely pegged on I/O. Vacuum will make this worse, and maybe therefore no transactions get through. You can fiddle with the vacuum settings to get them to back off a little and let some other transactions through. That said, your essential problem is that one table. Vacuum it more often -- from the look of the churn on it, I'd just put a job on it that runs all the time and sleeps for a few seconds in between -- and you shouldn't have this problem. But you'll need to VACUUM FULL or dump and reload first. A -- Andrew Sullivan | ajs@crankycanuck.ca Windows is a platform without soap, where rats run around in open sewers. --Daniel Eran