Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id B02CA9FA0AA for ; Fri, 31 Aug 2007 17:04:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 44818-09 for ; Fri, 31 Aug 2007 17:04:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id A83FC9F9F1A for ; Fri, 31 Aug 2007 17:04:05 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id AFD8A31434; Fri, 31 Aug 2007 22:04:03 +0200 (MET DST) From: Chris Browne X-Newsgroups: pgsql.performance Subject: Re: 8.2 Autovacuum BUG ? Date: Fri, 31 Aug 2007 15:13:54 -0400 Organization: cbbrowne Computing Inc Lines: 43 Message-ID: <60wsvbcya5.fsf@dba2.int.libertyrms.com> References: <46D83427.60001@livedatagroup.com> <25038.1188574775@sss.pgh.pa.us> <46D83C50.3040409@livedatagroup.com> <20070831161158.GD8046@alvh.no-ip.org> <46D840EC.1060302@livedatagroup.com> <1188577771.22730.238.camel@archimedes> <46D86103.6060204@livedatagroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.20 (linux) Cancel-Lock: sha1:46JrHeLFCNcdvwla9CI+UpQpdgk= To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.301 tagged_above=0 required=5 tests=AWL=0.300, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200708/411 X-Sequence-Number: 26541 pkalva@livedatagroup.com (Pallav Kalva) writes: > Mark Lewis wrote: >> On Fri, 2007-08-31 at 12:25 -0400, Pallav Kalva wrote: >> >>> Can you please correct me if I am wrong, I want to understand how >>> this works. >>> Based on what you said, it will run autovacuum again when it passes >>> 200M transactions, as SELECTS are transactions too and are going on >>> these tables. >>> But the next time when it runs autovacuum, it shouldnt freeze the >>> tuples again as they are already frozen and wont generate lot of >>> archive logs ? >>> Or is this because of it ran autovacuum for the first time on this >>> db ? just the first time it does this process ? >>> >> >> That is correct. The tuples are now frozen, which means that they will >> not need to be frozen ever again unless you insert/update any records. >> >> > > My main concern is filling up my disk with archive logs, so from all > the replies I get is that since tuples are already frozen, next time > when it runs autovacuum it wont generate any archive logs. > > Is my assumption right ? No, your assumption is wrong. Later vacuums will not generate archive files for the tuples that were *previously* frozen, but if you have additional tuples that have gotten old enough to reach the "freeze point," THOSE tuples will get frozen, and so you'll continue to see archive logs generated. And this is Certainly Not A Bug. If the system did not do this, those unfrozen tuples would eventually disappear when your current transaction XID rolls over. The freezing is *necessary.* -- let name="cbbrowne" and tld="cbbrowne.com" in name ^ "@" ^ tld;; http://linuxdatabases.info/info/unix.html Rules of the Evil Overlord #86. "I will make sure that my doomsday device is up to code and properly grounded."