Re: Free space management within heap page

From: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>
To: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
Cc: "ITAGAKI Takahiro" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Free space management within heap page
Date: 2007-01-23 10:30:23
Message-ID: 2e78013d0701230230n4643a30ao91f0001854154fc2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/23/07, Heikki Linnakangas <heikki(at)enterprisedb(dot)com> wrote:
>
> ITAGAKI Takahiro wrote:
>
> > Keeping only line pointers itself is not a problem, but it might lead
> > bloating of line pointers. If a particular tuple in a page is replaced
> > repeatedly, the line pointers area bloats up to 1/4 of the page.
>
> Where does the 1/4 figure come from?
>
> > We need to work around the problem.
>
> If a row is updated many times until vacuum comes along, what currently
> happens is that we end up with a bunch of pages full of dead tuples.
> With the truncation scheme, we could fit way more dead tuples on each
> page, reducing the need to vacuum. If a row is for example 40 bytes
> long, including header (a quite narrow one), you could fit 10 line
> pointers to the space of one row, which means that you could ideally
> multiply your vacuum interval by a factor of 10x. That's a huge benefit,
> though indexes would still bloat unless selects marking index pointers
> as dead keep the bloat in control.
>
> The problem is that if a tuple is updated say hundreds of times before
> vacuum, but then it's not updated anymore, you'll have a page full of
> useless line pointers that are not reclaimed. Clearly we should start
> reclaiming line pointers, but we can only do that for unused line
> pointers after the last used one.
>
>
I thought that we can not reclaim the line pointers unless we remove the
corresponding index entries as well. Isn't that the case ? If so, how would
we reclaim the line pointers after the last used one ?

Thanks,
Pavan

EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2007-01-23 10:35:39 Re: Free space management within heap page
Previous Message Heikki Linnakangas 2007-01-23 10:18:34 Re: 10 weeks to feature freeze (Pending Work)