Re: [PATCHES] Big number of "unused" pages as reported by VACUUM

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: [PATCHES] Big number of "unused" pages as reported by VACUUM
Дата
Msg-id GNELIHDDFBOCMGBFGEFOOEBMCEAA.chriskl@familyhealth.com.au
обсуждение исходный текст
Ответы Re: [PATCHES] Big number of "unused" pages as reported by  (Yury Bokhoncovich <byg@center-f1.ru>)
Список pgsql-hackers
Hi Yury,

This question should not be posted to -patches, changed accordingly.

What happens if you go 'VACUUM VERBOSE FULL goods;'?

Your on-disk files won't shrink or have unused tuples removed unless you
VACUUM FULL.  The problem with doing VACUUM FULL is that it totally locks
the whole table while it's running, meaning no-one can use the table.  This
is bad in production environments, so it's not the default.  Bear in mind
that postgres will re-use the unused portion of the table as you add new
tuples...

Chris

> Some time ago I've got troubles with performance of my PG.
> After investigation I had found that the most probable reason was the big
> number of "unused" pages. Below follows what VACUUM reported:
>
> =======================
> vacuum verbose goods;
> NOTICE:  --Relation goods--
> NOTICE:  Pages 15068: Changed 0, Empty 0; Tup 16157: Vac 0, Keep
> 0, UnUsed 465938.
> =======================
> select count(*) from goods;
>  count
> -------
>  16157



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Curt Sampson
Дата:
Сообщение: Re: Inheritance
Следующее
От: Gerhard Häring
Дата:
Сообщение: Re: Libpq.dll Souce Code