X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id D233111F7742 for ; Tue, 18 Apr 2006 18:34:48 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.353 X-Spam-Level: X-Spam-Status: No, score=-2.353 required=5 tests=[AWL=0.246, BAYES_00=-2.599] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id RlpkpT9LgFYR for ; Tue, 18 Apr 2006 18:34:46 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 3226111F644E for ; Tue, 18 Apr 2006 18:34:44 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 708FD56423; Tue, 18 Apr 2006 16:34:44 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Tue, 18 Apr 2006 16:34:44 -0500 Date: Tue, 18 Apr 2006 16:34:44 -0500 From: "Jim C. Nasby" To: Julien Drouard Cc: pgsql-performance@postgresql.org Subject: Re: pg_toast size Message-ID: <20060418213443.GJ49405@pervasive.com> References: <000c01c65fc5$41c78a70$0700a8c0@ankama.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000c01c65fc5$41c78a70$0700a8c0@ankama.lan> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060418:jdrouard@ankama.com::JEHOqVa4tkBOjtao:000000000000000000 0000000000000000000000003JJp X-Hashcash: 1:20:060418:pgsql-performance@postgresql.org::O5TYjhqyv7qHUf2s:00000 0000000000000000000000000rjz X-Archive-Number: 200604/399 X-Sequence-Number: 18483 On Fri, Apr 14, 2006 at 03:13:43PM +0200, Julien Drouard wrote: > Hi everyone, > > I've seen my pg_toast tables are becoming bigger and bigger. After googling I would like to modify my max_fsm_pages parameter to prevent that kind of problem. So I'm wondering if changing this parameter is enough and after that how can I reduce the size of these tables? By doing a full vacuum? A full vacuum would do it. CLUSTERing the table might rewrite the toast tables as well. As for toast, if you do a vacuum verbose over the entire cluster, it will tell you at the end how much space you need in the FSM. See also http://www.pervasivepostgres.com/instantkb13/article.aspx?id=10087 and http://www.pervasivepostgres.com/instantkb13/article.aspx?id=10116 -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461