Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 88216B5DD5E for ; Wed, 20 Jul 2011 03:02:38 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 21674-05-4 for ; Wed, 20 Jul 2011 06:02:32 +0000 (UTC) Received: from mx1.hub.org (mx1.hub.org [200.46.208.106]) by mail.postgresql.org (Postfix) with ESMTP id 79C2DB5DC37 for ; Wed, 20 Jul 2011 03:02:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mx1.hub.org (Postfix) with ESMTP id 014EF27FC7EB for ; Wed, 20 Jul 2011 00:13:43 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p6K3CQER028553; Tue, 19 Jul 2011 23:12:26 -0400 (EDT) To: Ken Caruso cc: pgsql-admin@postgresql.org Subject: Re: Bloat and Slow Vacuum Time on Toast In-reply-to: References: <5036.1311110810@sss.pgh.pa.us> Comments: In-reply-to Ken Caruso message dated "Tue, 19 Jul 2011 19:17:13 -0700" Date: Tue, 19 Jul 2011 23:12:26 -0400 Message-ID: <28552.1311131546@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201107/142 X-Sequence-Number: 37921 Ken Caruso writes: > On Tue, Jul 19, 2011 at 2:26 PM, Tom Lane wrote: >> Ken Caruso 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