Re: Unused item pointers - can someone explain?

From: "Peter Childs" <peterachilds(at)gmail(dot)com>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Unused item pointers - can someone explain?
Date: 2007-11-23 09:23:36
Message-ID: a2de01dd0711230123jf6dcae3s80f2c67e66e0680e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 21/11/2007, Elmer <sebastian(dot)franek(at)gmail(dot)com> wrote:
>
> Hello,
>
> I vacuumed one of my database tables. In vacuum output I saw the
> following information about unused item pointers:
>
> There were 19310 unused item pointers.
>
> As I understand It means that my table's file consists 19310 free
> tuple pointers.
>
> After some minutes I run vacuum again. It was quite unexpected for me
> that number of unused item pointers was increased to 19351. I thought
> unused item pointers are used in first place when new tuples versions
> are created but this example makes me think I am wrong. Can someone
> explain this to me?

Yes, however....

found x removable

have just been found and are now unused, so on the next run this number will
be added to the unused unless they get used again in the mean time.

The number ie the unused is the number of tuples left in the free space map
unused since the last vacuum. If its high it may be worth clustering or
running vacuum full but only if you don't think you table will never or
unlikely to grow (insert) or change (update) by less than that number of
records before you next run vacuum.

Generally only worry if the number is very very high (over 10000).

The best way of understanding the numbers is to run vacuum at regular
intervals and compare the output.

Peter.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Childs 2007-11-23 09:33:13 Re: Primary Key
Previous Message Greg Smith 2007-11-23 08:51:15 Re: Requesting for a pgadmin3-1.8.0 RPM for SL4