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 E60B49DC98A for ; Tue, 17 Jan 2006 13:28:34 -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 09501-10 for ; Tue, 17 Jan 2006 13:28:31 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from alvh.no-ip.org (201-220-123-7.bk10-dsl.surnet.cl [201.220.123.7]) by postgresql.org (Postfix) with ESMTP id E2A349DC983 for ; Tue, 17 Jan 2006 13:28:29 -0400 (AST) Received: by alvh.no-ip.org (Postfix, from userid 1000) id 28106C2DC59; Tue, 17 Jan 2006 14:30:47 -0300 (CLST) Date: Tue, 17 Jan 2006 14:30:47 -0300 From: Alvaro Herrera To: Chris Browne Cc: pgsql-performance@postgresql.org Subject: Re: Autovacuum / full vacuum Message-ID: <20060117173046.GA4296@surnet.cl> Mail-Followup-To: Chris Browne , pgsql-performance@postgresql.org References: <20060117145649.GE21092@phlogiston.dyndns.org> <608xteerfh.fsf@dba2.int.libertyrms.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <608xteerfh.fsf@dba2.int.libertyrms.com> User-Agent: Mutt/1.5.11 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.924 required=5 tests=[AWL=0.005, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44] X-Spam-Score: 1.924 X-Spam-Level: * X-Archive-Number: 200601/251 X-Sequence-Number: 16729 Chris Browne wrote: > ajs@crankycanuck.ca (Andrew Sullivan) writes: > > On Tue, Jan 17, 2006 at 11:18:59AM +0100, Michael Riess wrote: > >> hi, > >> > >> I'm curious as to why autovacuum is not designed to do full vacuum. I > > > > Because nothing that runs automatically should ever take an exclusive > > lock on the entire database, which is what VACUUM FULL does. > > That's a bit more than what autovacuum would probably do... > autovacuum does things table by table, so that what would be locked > should just be one table. Even a database-wide vacuum does not take locks on more than one table. The table locks are acquired and released one by one, as the operation proceeds. And as you know, autovacuum (both 8.1's and contrib) does issue database-wide vacuums, if it finds a database close to an xid wraparound. -- Alvaro Herrera http://www.advogato.org/person/alvherre "Las mujeres son como hondas: mientras más resistencia tienen, más lejos puedes llegar con ellas" (Jonas Nightingale, Leap of Faith)