X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A154B536B6 for ; Tue, 19 Apr 2005 13:24:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 50456-01 for ; Tue, 19 Apr 2005 16:24:10 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 4C5B15363E for ; Tue, 19 Apr 2005 13:24:07 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j3JGO2Pj022305; Tue, 19 Apr 2005 12:24:02 -0400 (EDT) To: Josh Berkus Cc: "Tambet Matiisen" , "Bill Chandler" , "pgsql-perform" Subject: Re: Question on REINDEX In-reply-to: <200504190857.16634.josh@agliodbs.com> References: <200504190857.16634.josh@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Tue, 19 Apr 2005 08:57:16 -0700" Date: Tue, 19 Apr 2005 12:24:02 -0400 Message-ID: <22304.1113927842@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/459 X-Sequence-Number: 11856 Josh Berkus writes: >> select count(1), sum(relpages) from pg_class where relkind in >> ('r','i','t') > Well, if you do that for all databases in the cluster, it's the number you > start with. However, setting FSM_pages to that would be assuming that you > excpected 100% of the rows to be replaced by UPDATES or DELETEs before you > ran VACUUM. I generally run VACUUM a little sooner than that. Not at all. What it says is that you expect 100% of the pages to have useful amounts of free space, which is a *much* weaker criterion. I think you can usually get away with setting max_fsm_pages to less than your actual disk footprint, but I'm not sure how much less. It'd probably depend a lot on your usage pattern --- for instance, insert-only history tables don't need any FSM space. regards, tom lane