pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ken Caruso <ken@ipl31.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Bloat and Slow Vacuum Time on Toast
Date: Tue, 19 Jul 2011 23:12:26 -0400
Message-ID: <28552.1311131546@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMg8r_qzSRYkJsL6mPTa3z2nZ9x+Udkk+SYAwtvSbnXWgjTbQQ@mail.gmail.com>
References: <CAMg8r_o=sHXqOzPgNw9+ndp+-0bAK6DBcjCu0poZn2se5qC-vQ@mail.gmail.com>
	<5036.1311110810@sss.pgh.pa.us>
	<CAMg8r_qzSRYkJsL6mPTa3z2nZ9x+Udkk+SYAwtvSbnXWgjTbQQ@mail.gmail.com>

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



view thread (7+ messages)

Message-ID: <28552.1311131546@sss.pgh.pa.us>
Permalink:  ../28552.1311131546@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/28552.1311131546@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ken@ipl31.net
  Subject: Re: Bloat and Slow Vacuum Time on Toast
  In-Reply-To: <28552.1311131546@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox