Re: [PATCHES] Big number of "unused" pages as reported by VACUUM - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: [PATCHES] Big number of "unused" pages as reported by VACUUM
Date
Msg-id GNELIHDDFBOCMGBFGEFOOEBMCEAA.chriskl@familyhealth.com.au
Whole thread Raw
Responses Re: [PATCHES] Big number of "unused" pages as reported by  (Yury Bokhoncovich <byg@center-f1.ru>)
List 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 by date:

Previous
From: Curt Sampson
Date:
Subject: Re: Inheritance
Next
From: Gerhard Häring
Date:
Subject: Re: Libpq.dll Souce Code