Simon Riggs wrote:
> > I need clarification here.  Is removing dead heap tuple always going to
> > require an index scan, or was this just for chilling a row (adding an
> > index)?
> We can remove a tupled marked HEAP_ONLY_TUPLE when it is status
> HEAPTUPLE_DEAD. The HEAP_UPDATE_ROOT tuple can be reduced to a
> TupleStub, but not removed. Multiple tuples in the chain can be removed,
> though the HEAP_UPDATE_ROOT's t_ctid must be modified to point to the
> first non-removed tuple in the chain. All of that can be done when we
> hold a CleanupLock on the block, without reference to the indexes; this
> can be performed on-demand, when we attempt an UPDATE. This is similar
> to what already happens prior to a btree split operation. (This could
> also be performed by bgwriter, but that isn't proposed at this time
> because the buffer transit time through the cache is often not long
> enough to allow tuples to die and get benefit from space reuse).
> TupleStubs can be marked for removal by a pointer-swing operation during
> normal VACUUM, i.e. it will require touching the indexes.

OK, that sounds like a good plan.  Thanks.

  Bruce Momjian  <[EMAIL PROTECTED]>

  + If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?


Reply via email to