Re: What is an 'unused item pointer' - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: What is an 'unused item pointer'
Date
Msg-id 20050925002754.GT7630@pervasive.com
Whole thread Raw
In response to Re: What is an 'unused item pointer'  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: What is an 'unused item pointer'
List pgsql-general
On Sat, Sep 24, 2005 at 07:19:10PM -0400, Tom Lane wrote:
> "Jim C. Nasby" <jnasby@pervasive.com> writes:
> > I can't seem to find info about this in the docs, or on the web.
>
> http://developer.postgresql.org/docs/postgres/storage-page-layout.html
>
> Currently, when a tuple is reclaimed by VACUUM, we just mark its item
> pointer as unused (and hence recyclable).  I think it might be safe to
> decrease pd_lower if there are unused pointers at the end of the page's
> pointer array, but we don't currently do that.  In any case there could
> still be unused pointers embedded within the array.

I suspect that if the free space in pages isn't collapsed during vacuum
then it probably doesn't matter, but I don't know if that's the case. If
it is collapsed then my intuition is that tables that are fairly narrow
would benefit from adjusting pd_lower because it wouldn't take too many
item pointers to equate to a tuple. This would probably be even more
pronounced if the tuples were generally small but could vary to a larger
size.

Sounds like a good newbie TODO?
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: What is an 'unused item pointer'
Next
From: Sterpu Victor
Date:
Subject: createdb problem