Home > Archive > PostgreSQL Discussion > September 2005 > What is an 'unused item pointer'









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author What is an 'unused item pointer'
Jim C. Nasby

2005-09-24, 8:23 pm

I can't seem to find info about this in the docs, or on the web.
--
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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Tom Lane

2005-09-24, 8:23 pm

"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/doc...age-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.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Jim C. Nasby

2005-09-24, 8:23 pm

On Sat, Sep 24, 2005 at 07:19:10PM -0400, Tom Lane wrote:
> "Jim C. Nasby" <jnasby@pervasive.com> writes:
>
> http://developer.postgresql.org/doc...age-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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Tom Lane

2005-09-25, 3:23 am

"Jim C. Nasby" <jnasby@pervasive.com> writes:
> On Sat, Sep 24, 2005 at 07:19:10PM -0400, Tom Lane wrote:
[color=darkred]
> Sounds like a good newbie TODO?


Uh, no, because the $64 question is whether it actually *is* safe, or
perhaps would be safe with more locking than we do now. I'm not sure of
the answer myself, and would have zero confidence in a newbie's answer.

Decreasing pd_lower would definitely be a win if we can do it free or
cheaply. If it requires significant additional locking overhead, then
maybe not.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Jim C. Nasby

2005-09-26, 11:23 am

On Sun, Sep 25, 2005 at 12:09:24AM -0400, Tom Lane wrote:
> "Jim C. Nasby" <jnasby@pervasive.com> writes:
>
>
> Uh, no, because the $64 question is whether it actually *is* safe, or
> perhaps would be safe with more locking than we do now. I'm not sure of
> the answer myself, and would have zero confidence in a newbie's answer.
>
> Decreasing pd_lower would definitely be a win if we can do it free or
> cheaply. If it requires significant additional locking overhead, then
> maybe not.


Ok, sounds like a non-newbie TODO then. :)
--
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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com