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 701F09DC99B for ; Tue, 17 Jan 2006 15:04:10 -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 23285-01 for ; Tue, 17 Jan 2006 15:04:09 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 5901E9DC98D for ; Tue, 17 Jan 2006 15:04:07 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id AC3F130F0B; Tue, 17 Jan 2006 20:04:07 +0100 (MET) From: Chris Browne X-Newsgroups: pgsql.performance Subject: Re: Autovacuum / full vacuum Date: Tue, 17 Jan 2006 13:40:46 -0500 Organization: cbbrowne Computing Inc Lines: 31 Message-ID: <604q42elzl.fsf@dba2.int.libertyrms.com> References: <20060117145649.GE21092@phlogiston.dyndns.org> <608xteerfh.fsf@dba2.int.libertyrms.com> <20060117173046.GA4296@surnet.cl> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (Jumbo Shrimp, linux) Cancel-Lock: sha1:Vpmknl2KaUjQKfHlAx1h1EfvIUc= To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.253 required=5 tests=[AWL=0.253] X-Spam-Score: 0.253 X-Spam-Level: X-Archive-Number: 200601/254 X-Sequence-Number: 16732 alvherre@alvh.no-ip.org (Alvaro Herrera) writes: > 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. Has that changed recently? I have always seen "vacuumdb" or SQL "VACUUM" (without table specifications) running as one long transaction which doesn't release the locks that it is granted until the end of the transaction. -- "cbbrowne","@","acm.org" http://cbbrowne.com/info/spiritual.html "My nostalgia for Icon makes me forget about any of the bad things. I don't have much nostalgia for Perl, so its faults I remember." -- Scott Gilbert comp.lang.python