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