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

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Yury Bokhoncovich" <byg(at)center-f1(dot)ru>, "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] Big number of "unused" pages as reported by VACUUM
Date: 2002-09-06 06:29:19
Message-ID: GNELIHDDFBOCMGBFGEFOOEBMCEAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gerhard Häring 2002-09-06 06:32:56 Re: Libpq.dll Souce Code
Previous Message Yury Bokhoncovich 2002-09-06 06:04:14 Big number of "unused" pages as reported by VACUUM

Browse pgsql-patches by date

  From Date Subject
Next Message Yury Bokhoncovich 2002-09-06 06:56:52 Re: [PATCHES] Big number of "unused" pages as reported by
Previous Message Yury Bokhoncovich 2002-09-06 06:04:14 Big number of "unused" pages as reported by VACUUM