[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    Re: [ADMIN] Bloat and Slow Vacuum Time on Toast
From:       Tom Lane <tgl () sss ! pgh ! pa ! us>
Date:       2011-07-20 3:12:26
Message-ID: 28552.1311131546 () sss ! pgh ! pa ! us
[Download RAW message or body]

Ken Caruso <ken@ipl31.net> writes:
> On Tue, Jul 19, 2011 at 2:26 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Ken Caruso <ken@ipl31.net> writes:
>>> If I look at the total relation size using the following query:
>>> SELECT SUM(pg_relation_size(pg_class.oid)) FROM pg_class ;
>>> This says the total size is around 191GB.

>> What PG version?

> 9.0.4

OK, so you need to worry about alternate forks.  Your query is the same
as

select sum(pg_relation_size(oid, 'main')) from pg_class;

I bet you'll find that the difference is accounted for by one of

select sum(pg_relation_size(oid, 'fsm')) from pg_class;
select sum(pg_relation_size(oid, 'vm')) from pg_class;

Drill down and see which table is responsible ...

			regards, tom lane

-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic