Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id ACFFD9FB723 for ; Fri, 8 Jun 2007 12:23:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 64464-03 for ; Fri, 8 Jun 2007 12:23:02 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 4610A9FB661 for ; Fri, 8 Jun 2007 12:23:11 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.8/8.13.8) with ESMTP id l58FN2ME065804 for ; Fri, 8 Jun 2007 12:23:02 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.8/8.13.8/Submit) id l58FKSPb063862 for pgsql-admin@postgresql.org; Fri, 8 Jun 2007 12:20:28 -0300 (ADT) (envelope-from news) From: "Charles.Hou" X-Newsgroups: pgsql.admin Subject: Re: the right time to vacuum database? Date: Fri, 08 Jun 2007 08:20:36 -0700 Organization: http://groups.google.com Lines: 39 Message-ID: <1181316036.270635.44890@o11g2000prd.googlegroups.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Complaints-To: groups-abuse@google.com In-Reply-To: <20070608142030.GX17144@phlogiston.dyndns.org> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; FDM; InfoPath.1; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 Ezxcess200.antlabs.com:3128 (PROXY/4.7.STABLE6) Complaints-To: groups-abuse@google.com Injection-Info: o11g2000prd.googlegroups.com; posting-host=61.221.178.66; posting-account=Mznd-A0AAABITZ14OcULoTm5bpaBaOsm To: pgsql-admin@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/84 X-Sequence-Number: 25752 On Jun 8, 10:20 pm, a...@crankycanuck.ca (Andrew Sullivan) wrote: > On Fri, Jun 08, 2007 at 06:29:55AM -0700, Charles.Hou wrote: > > > i have traced the size of the table. About 1000 new rows will be > > inserted into the table in one day. each row has 300 bytes. > > 1000*300/1024=293K, but the size of this table had been increased 3MB. > > 3MB-293K=2.7MB...Why?where is the 2.7MB? > > How do you know what the size of the table is? You had at least two > tables you were working on before. I think there must be something > you're not communicating completely. (And why are you worried about > less than 3 Meg anyway? Regular vacuum will leave some empty space > around for new data, which means you don't have to go down to the > filesystem to make the file bigger before you write it it. This is a > Good Thing.) > > Please go back and run VACUUM VERBOSE on the table you killed the > vacuum on before. > > A > > -- > Andrew Sullivan | a...@crankycanuck.ca > However important originality may be in some fields, restraint and > adherence to procedure emerge as the more significant virtues in a > great many others. --Alain de Botton > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster 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. > How do you know what the size of the table is? i got the relname from the pg_class and go to find the relname on the disk.