Re: Bloat and Slow Vacuum Time on Toast

From: Ken Caruso <ken(at)ipl31(dot)net>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Bloat and Slow Vacuum Time on Toast
Date: 2011-07-19 21:00:10
Message-ID: CAMg8r_qEB6eWBeTNbqnT+61xRT82KzkAXQBbEDduu1m0_byadw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Jul 19, 2011 at 1:50 PM, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov
> wrote:

> Ken Caruso <ken(at)ipl31(dot)net> wrote:
>
>
> > SELECT SUM(pg_relation_size(pg_class.oid))
> > FROM pg_class ;
>
> Perhaps you want pg_total_relation_size()?
>
> -Kevin
>

The number returned when using pg_total_relation size makes more sense:
346GB. However it looked like pg_class has toast and indexes listed
individually, so I assumed that using pg_total_relation_size would count
values twice, because the total relation size of table would include toast
and indexes, and then they would get counted again when I ran
pg_total_relation_size on the toast and indexes themselves. Is that an
incorrect assumption on my part?

Thanks

-Ken

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2011-07-19 21:26:50 Re: Bloat and Slow Vacuum Time on Toast
Previous Message Kevin Grittner 2011-07-19 20:50:15 Re: Bloat and Slow Vacuum Time on Toast