Re: Free space management within heap page - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: Free space management within heap page
Date
Msg-id 2e78013d0701230103y1d587db9q6733adca0ca92ca0@mail.gmail.com
Whole thread Raw
In response to Re: Free space management within heap page  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Free space management within heap page  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Re: Free space management within heap page  (Heikki Linnakangas <heikki@enterprisedb.com>)
Re: Free space management within heap page  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers


On 1/23/07, Martijn van Oosterhout <kleptog@svana.org> wrote:
On Tue, Jan 23, 2007 at 01:48:08PM +0530, Pavan Deolasee wrote:

> We might not be able to reuse the line pointers because indexes may have
> references to it. All such line pointers will be freed when the page is
> vacuumed during the regular vacuum.

The overwhelming vast majoirty of tuples are going to be in one or more
indexes. Which means nearly all tuples are going to fall into this
category. So where's the benefit?

The line pointers can not reused, but the space consumed by the tuple can be.
So the benefit is in utilizing that space for newer tuples and thus reduce the
bloat.

One assumption I am  making here is that its sufficient to mark the line pointer
"unused" (reset LP_USED flag) even though there is an index entry pointing to
the tuple. During index scan, we anyways check for ItemIdIsUsed() before
proceeding further. I know it might break the ctid chain, but does that really
matter ? I don't see any reason why somebody would need to follow ctid chain
past a dead tuple.

Thanks,
Pavan

EnterpriseDB     http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Free space management within heap page
Next
From: ITAGAKI Takahiro
Date:
Subject: Re: Free space management within heap page