Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 51B149FB579 for ; Thu, 7 Jun 2007 12:30:56 -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 61112-02-2 for ; Thu, 7 Jun 2007 12:30:42 -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 B0D639FC02E for ; Thu, 7 Jun 2007 12:30:49 -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 1HwJwm-0001Pf-6j for pgsql-general@postgresql.org; Thu, 07 Jun 2007 11:30:48 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id DBD60404E; Thu, 7 Jun 2007 11:30:42 -0400 (EDT) Date: Thu, 7 Jun 2007 11:30:42 -0400 From: Andrew Sullivan To: pgsql-general@postgresql.org Subject: Re: Auto Vacuum question? Message-ID: <20070607153042.GD14087@phlogiston.dyndns.org> References: <1180955712.688195.233560@i38g2000prf.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1180955712.688195.233560@i38g2000prf.googlegroups.com> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/520 X-Sequence-Number: 115343 On Mon, Jun 04, 2007 at 04:15:12AM -0700, ivan.hou@msa.hinet.net wrote: > after i executed the command " vaccumdb -f -z testdb", but the size > just decreased 1 or 2MB... > what's the problem? vacuumdb -f does a FULL vacuum, which is blocking and compacts the tables. If it only compacted 1 or 2 M, then there are two possibilities: 1. You really do have that much data. You haven't told us anything about the data, what it looks like, how wide the tables are, whether you have large objects &c., whether the character set is multibyte. . . 2. You have at least one long-running transaction that is perhaps doing nothing, but that is preventing VACUUM from recovering space. What does ps -auxww | grep postgres (or something equivalant) show you? A -- Andrew Sullivan | ajs@crankycanuck.ca Users never remark, "Wow, this software may be buggy and hard to use, but at least there is a lot of code underneath." --Damien Katz