Skip site navigation (1) Skip section navigation (2)

Re: vacuum verbose relations reporting

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Jeff Frost <jeff(at)frostconsultingllc(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Carol Walter <walterc(at)indiana(dot)edu>, pgsql-admin(at)postgresql(dot)org
Subject: Re: vacuum verbose relations reporting
Date: 2008-08-27 01:36:12
Message-ID: 20080827013612.GT4920@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-admin
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

In response to

Responses

pgsql-admin by date

Next:From: Jeff FrostDate: 2008-08-27 06:02:31
Subject: Re: vacuum verbose relations reporting
Previous:From: Jeff FrostDate: 2008-08-27 01:21:29
Subject: Re: vacuum verbose relations reporting

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group