Re: Bloat and Slow Vacuum Time on Toast

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bloat and Slow Vacuum Time on Toast
Дата
Msg-id 28552.1311131546@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bloat and Slow Vacuum Time on Toast  (Ken Caruso <ken@ipl31.net>)
Список 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 по дате отправления:

Предыдущее
От: Ken Caruso
Дата:
Сообщение: Re: Bloat and Slow Vacuum Time on Toast
Следующее
От: Cédric Villemain
Дата:
Сообщение: Re: 9.0.4 Data corruption issue