Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 6A29B65022E for ; Tue, 26 Aug 2008 22:36:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 96242-04 for ; Tue, 26 Aug 2008 22:36:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id 2BD1C650224 for ; Tue, 26 Aug 2008 22:36:26 -0300 (ADT) Received: from perhan.alvh.no-ip.org (190-95-19-36.bk17-dsl.surnet.cl [190.95.19.36]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m7R1dIZs015084 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 26 Aug 2008 18:39:22 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 725E147CA5; Tue, 26 Aug 2008 21:36:12 -0400 (CLT) Date: Tue, 26 Aug 2008 21:36:12 -0400 From: Alvaro Herrera To: Jeff Frost Cc: Tom Lane , Carol Walter , pgsql-admin@postgresql.org Subject: Re: vacuum verbose relations reporting Message-ID: <20080827013612.GT4920@alvh.no-ip.org> References: <11312.1219794535@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Tue, 26 Aug 2008 18:39:22 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/189 X-Sequence-Number: 30034 Jeff Frost wrote: > Tom, is there an easy (or hard) way to count relations from all DBs by > using the system catalogs? Just do a count(*) from pg_class where relkind in ('r', 't', 'i'), and sum across all databases (you need to connect to each one). (Actually you only need to count indexes that are btrees, if you need such a distinction. Other indexes do not use the FSM as far as I know). -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support