Re: Bloat and Slow Vacuum Time on Toast - Mailing list pgsql-admin

From Tom Lane
Subject Re: Bloat and Slow Vacuum Time on Toast
Date
Msg-id 28552.1311131546@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bloat and Slow Vacuum Time on Toast  (Ken Caruso <ken@ipl31.net>)
List pgsql-admin
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

pgsql-admin by date:

Previous
From: Ken Caruso
Date:
Subject: Re: Bloat and Slow Vacuum Time on Toast
Next
From: Cédric Villemain
Date:
Subject: Re: 9.0.4 Data corruption issue