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 17:26:50 -0400
Message-ID: <5036.1311110810@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMg8r_o=sHXqOzPgNw9+ndp+-0bAK6DBcjCu0poZn2se5qC-vQ@mail.gmail.com>
References: <CAMg8r_o=sHXqOzPgNw9+ndp+-0bAK6DBcjCu0poZn2se5qC-vQ@mail.gmail.com>
Ken Caruso <ken@ipl31.net> writes:
> I am trying to trouble shoot a couple of issue related to vacuum and db
> size. I currently have a postgres DB that is around 390GB on disk (du -hs in
> $PG_DATA/base). 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. That query should sum all of the
> tables, toast and indexes AFAIK.
What PG version?
If it's a version with multiple table forks, you're only counting the
main forks, not FSM or VM.
Theoretically the latter two should be pretty small relative to the main
fork, but obviously you are missing something with this query ...
regards, tom lane
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: <5036.1311110810@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