Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id F17AB64FF8A for ; Fri, 5 Sep 2008 13:39:13 -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 74115-02 for ; Fri, 5 Sep 2008 13:39:11 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.228]) by postgresql.org (Postfix) with ESMTP id E544B64FD1A for ; Fri, 5 Sep 2008 13:39:10 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so681970rvf.43 for ; Fri, 05 Sep 2008 09:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=cIb+KDxu/kT6BsH1/w4NVdsOsV2uPKev+reUOYE4guM=; b=Pc2H9T9UtKoU1F5BJpWnMOYBilP0dSsMwIKMuhcKhDCJ7wzo+SA7MIh3sbEuhU3ipB 3/JliesC4Z6yIg+H0lT6mJUytQGMi7emwpSnnCaIbPL1GYeHH2Vq4FuQbg54BzWklZEz F6Qa6Wd+sIElGw9JWjp1w6a5WQjUHzOGbCg4E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=gxwTq4BlFU45ozkVQirpqLHQ72NDePAQwRGufWg2OpgTNNMa4haAiAKzIyMRwebotx YOz53GvSvTgeRc/jtXVg/7v0BaBUY50+Hr9tRAtJURAZAmxxqD6V5+nWMXZehasGCgjH 36+5SZV7rLOkuthryCQbSfdrr1VfMrkY3TM34= Received: by 10.141.29.21 with SMTP id g21mr6727535rvj.225.1220632749380; Fri, 05 Sep 2008 09:39:09 -0700 (PDT) Received: by 10.141.74.11 with HTTP; Fri, 5 Sep 2008 09:39:09 -0700 (PDT) Message-ID: Date: Fri, 5 Sep 2008 10:39:09 -0600 From: "Scott Marlowe" To: "Duan Ligong" Subject: Re: too many clog files Cc: "Greg Smith" , pgsql-performance@postgresql.org In-Reply-To: <20080905095051.93A6.DUANLG@nec-as.nec.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080902091602.CA09.DUANLG@nec-as.nec.com.cn> <20080905095051.93A6.DUANLG@nec-as.nec.com.cn> 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/76 X-Sequence-Number: 31389 On Thu, Sep 4, 2008 at 8:58 PM, Duan Ligong wrote: > Thanks for your reply. > > 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. > But now the size of pg_clog has exceeded 50MB and there > are 457 clog files. That is absolutely not the thing to do. Put them back, and do a dump-restore on the database if you need to save a few hundred megs on the drive. Deleting files from underneath postgresql is a great way to break your database in new and interesting ways which are often fatal to your data.