Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 1558964FD1A for ; Fri, 5 Sep 2008 13:25:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 68195-03 for ; Fri, 5 Sep 2008 13:25:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id B923B64FCEB for ; Fri, 5 Sep 2008 13:25:44 -0300 (ADT) Received: from perhan.alvh.no-ip.org (200-126-66-230.bk5-dsl.surnet.cl [200.126.66.230]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m85GS3rf022286 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Sep 2008 09:28:06 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 7158947CA7; Fri, 5 Sep 2008 12:24:46 -0400 (CLT) Date: Fri, 5 Sep 2008 12:24:46 -0400 From: Alvaro Herrera To: Duan Ligong Cc: Greg Smith , pgsql-performance@postgresql.org Subject: Re: too many clog files Message-ID: <20080905162446.GF4353@alvh.no-ip.org> References: <20080902091602.CA09.DUANLG@nec-as.nec.com.cn> <20080905095051.93A6.DUANLG@nec-as.nec.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080905095051.93A6.DUANLG@nec-as.nec.com.cn> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Fri, 05 Sep 2008 09:28:07 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/75 X-Sequence-Number: 31388 Duan Ligong wrote: > Greg wrote: > > On Tue, 2 Sep 2008, Duan Ligong wrote: > > > - Does Vacuum delete the old clog files? > > > > Yes, if those transactions are all done. One possibility here is that > > you've got some really long-running transaction floating around that is > > keeping normal clog cleanup from happening. Take a look at the output > > from "select * from pg_stat_activity" and see if there are any really old > > transactions floating around. > > Well, we could not wait so long and just moved the old clog files. > The postgresql system is running well. Move the old clog files back where they were, and run VACUUM FREEZE in all your databases. That should clean up all the old pg_clog files, if you're really that desperate. This is not something that I'd recommend doing on a periodic basis ... -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.