X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id E1A619DC959 for ; Tue, 17 Jan 2006 11:13:55 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 63399-04 for ; Tue, 17 Jan 2006 11:14:00 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from r1.mycybernet.net (r1.mycybernet.net [209.5.206.8]) by postgresql.org (Postfix) with ESMTP id 3FEF49DC97E for ; Tue, 17 Jan 2006 11:13:53 -0400 (AST) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227]:34756 helo=phlogiston.dydns.org) by r1.mycybernet.net with esmtp (Exim 4.50 (FreeBSD)) id 1EysWz-000CDf-Rz for pgsql-performance@postgresql.org; Tue, 17 Jan 2006 10:13:57 -0500 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 69D374069; Tue, 17 Jan 2006 10:13:57 -0500 (EST) Date: Tue, 17 Jan 2006 10:13:57 -0500 From: Andrew Sullivan To: pgsql-performance@postgresql.org Subject: Re: Autovacuum / full vacuum Message-ID: <20060117151357.GH21092@phlogiston.dyndns.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.082 required=5 tests=[AWL=0.082] X-Spam-Score: 0.082 X-Spam-Level: X-Archive-Number: 200601/243 X-Sequence-Number: 16721 On Tue, Jan 17, 2006 at 03:05:29PM +0100, Michael Riess wrote: > There must be a way to implement a daemon which frees up space of a > relation without blocking it too long. Define "too long". If I have a table that needs to respond to a SELECT in 50ms, I don't have time for you to lock my table. If this were such an easy thing to do, don't you think the folks who came up wit the ingenious lazy vacuum system would have done it? Remember, a vacuum full must completely lock the table, because it is physically moving bits around on the disk. So a SELECT can't happen at the same time, because the bits might move out from under the SELECT while it's running. Concurrency is hard, and race conditions are easy, to implement. A -- Andrew Sullivan | ajs@crankycanuck.ca A certain description of men are for getting out of debt, yet are against all taxes for raising money to pay it off. --Alexander Hamilton