Re: AW: update on TOAST status' - Mailing list pgsql-hackers

From JanWieck@t-online.de (Jan Wieck)
Subject Re: AW: update on TOAST status'
Date
Msg-id 200007111649.SAA18903@hot.jw.home
Whole thread Raw
In response to AW: update on TOAST status'  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
List pgsql-hackers
Zeugswetter Andreas SB wrote:
>
> >     It appears that brtee indices (at least) can keep  references
> >     to  old  toast  values  that  survive  a  VACUUM! Seems these
> >     references live in nodes actually not  referring  to  a  heap
> >     tuple   any   more,   but   used  during  tree  traversal  in
> >     comparisions.  As if an index tuple delete from a  btree  not
> >     necessarily  causes  the  index  value  to disappear from the
> >     btree completely.  It'll never be returned by an index  scan,
> >     but the value is still there somewhere.
>
> Would it be possible to actually delete those entries during vacuum ?
> I guess that would be an overall win, no ?
   Seems  I explained it a little confusing or am confused by it   myself.
   Either way, VACUUM does DELETE those from  the  indices!  But   btree  is a Balanced Tree, and ISTM that it
sometimesdecides   to keep a deleted node just to have  trees  balanced  and  to   decide  on it whether to go left or
right.An index scan will   never return those nodes, but exactly at the time btree needs   to decide left/right, it
callsthe type specific CMP function   and that in turn invokes the toast fetch.
 
   A pure btree does not have the need for it, but we're using a   high  concurrency  optimized  version called nbtree.
Thatone   seems to do so.
 


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #




pgsql-hackers by date:

Previous
From: "Mikheev, Vadim"
Date:
Subject: RE: Storage Manager (was postgres 7.2 features.)
Next
From: JanWieck@t-online.de (Jan Wieck)
Date:
Subject: Re: AW: Storage Manager (was postgres 7.2 features.)