Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 6E64D9FB310 for ; Fri, 8 Jun 2007 12:35:07 -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 79639-06 for ; Fri, 8 Jun 2007 12:35:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from main2.mycybernet.net (main2.mycybernet.net [209.222.63.140]) by postgresql.org (Postfix) with ESMTP id BC2B39FB5FA for ; Fri, 8 Jun 2007 12:35:03 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227] helo=phlogiston.dydns.org) by main2.mycybernet.net with esmtp (Exim 4.62) (envelope-from ) id 1HwgUR-00071L-3p; Fri, 08 Jun 2007 11:35:03 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id B9D5F3F9E; Fri, 8 Jun 2007 11:34:57 -0400 (EDT) Date: Fri, 8 Jun 2007 11:34:57 -0400 From: Andrew Sullivan To: "Charles.Hou" Cc: pgsql-admin@postgresql.org Subject: Re: the right time to vacuum database? Message-ID: <20070608153457.GM17144@phlogiston.dyndns.org> References: <1181039589.643323.59660@r19g2000prf.googlegroups.com> <20070605132546.GI4818@phlogiston.dyndns.org> <1181089690.963738.260660@n15g2000prd.googlegroups.com> <20070606195101.GF11545@phlogiston.dyndns.org> <1181200023.281625.249120@n15g2000prd.googlegroups.com> <20070607174639.GG14087@phlogiston.dyndns.org> <1181309395.707448.201490@i13g2000prf.googlegroups.com> <20070608142030.GX17144@phlogiston.dyndns.org> <1181316036.270635.44890@o11g2000prd.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1181316036.270635.44890@o11g2000prd.googlegroups.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/85 X-Sequence-Number: 25753 On Fri, Jun 08, 2007 at 08:20:36AM -0700, Charles.Hou wrote: > because if the size of database have been increased 36MB in one day , > then it will be 1G MB increased after 1 month. so i worry about the > size. other strange thing, if i block all postgresql client and run > vacuumdb, there will have about 100MB free space. Your conclusion of linear growth doesn't actually follow from your premises. In any case, it sounds to me like (1) you're not vacuuming often enough and (2) you have transactions open from the clients which are preventing vacuuming from being effective. Autovacuum will solve (1) now that you've enabled it, but you need to fix your existing bloat (which probably means either VACUUM FULL or CLUSTER and REINDEX). (2) is a bigger problem, which you need to address at the client. Also, I bet your free space map is too small. Increase it. I have the feeling, on the basis of this thread, that you need to spend some more time with the manual. A -- Andrew Sullivan | ajs@crankycanuck.ca In the future this spectacle of the middle classes shocking the avant- garde will probably become the textbook definition of Postmodernism. --Brad Holland