Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 34B982E003D for ; Tue, 8 Apr 2008 04:38:24 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 74285-05 for ; Tue, 8 Apr 2008 04:37:56 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.177]) by developer.postgresql.org (Postfix) with ESMTP id 973CD2E0048 for ; Tue, 8 Apr 2008 04:37:58 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id m38so2037043waf.5 for ; Tue, 08 Apr 2008 00:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=vQweplLdPfPTjkGW7dJxkueX9DaWbrgSL/44cK85c9E=; b=OlGRHjzQphWztj5trSoWCJY2a69Papta+XpGwY71W69ugucldu2pEQ2Z5jDuaf0MTW2jrQvcPBrUx0W70VdDVbNlBi802vfl89lahcuDRuyBRJvV4pFXXE1LbWMJB5tDEByvHek8C7WilhJy4z0AeFBYlwvcmiLyf/wba+bl4js= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=qXGnNToNKOXzLucYZOOrHGmVdgziSuFAmuNRvCxv/3eeBHEDNifYXv5rSqZL0enLE0bfsSrIgtmLJWaoQoYtai7oD7QR0bQ1W75+AMSk8QaiIaKSgmwrfL/LgEaQVyO7gRK9rhIYwl6aMTt6VT9bd+xCCE/0TQx6W6agrQFTwYk= Received: by 10.115.61.1 with SMTP id o1mr404349wak.94.1207640276427; Tue, 08 Apr 2008 00:37:56 -0700 (PDT) Received: from ?192.168.1.102? ( [24.7.64.54]) by mx.google.com with ESMTPS id m30sm16635376wag.21.2008.04.08.00.37.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 08 Apr 2008 00:37:55 -0700 (PDT) Message-ID: <47FB20D4.3050504@gmail.com> Date: Tue, 08 Apr 2008 00:37:56 -0700 From: paul rivers User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 To: Michael Monnerie CC: pgsql-admin@postgresql.org Subject: Re: Tuning References: <6F737A76-FC25-4876-A6E0-163B87ECFAB0@indiana.edu> <200804080917.27689@zmi.at> In-Reply-To: <200804080917.27689@zmi.at> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/64 X-Sequence-Number: 28828 Michael Monnerie wrote: > On Montag, 7. April 2008 Scott Marlowe wrote: > >> You can monitor things like index and table bloat with the pg_stat_* >> series of views. >> > > Are there scripts to automate this look at stats? > Or could one draw graphs from that values, to visualize how well the db > is? E.g., if you could calculate a % value, you could make RRD stats to > see it's change over time. Is there any project on this? > > mfg zmi > I don't see a direct way to monitor bloat from pg_stat*. If I'm wrong, please set me straight. For example, monitoring index bloat would involve deciding how many pages an index would ideally consume, based on either sampling the table yourself or raiding stats, and making assumptions. Then you'd compare to actual (or approximated actual) and decide if you were within whatever threshold you think is OK. Paul