Re: HOT for PostgreSQL 8.3

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Pavan Deolasee <pavan(dot)deolasee(at)enterprisedb(dot)com>, Nikhil S <nikhil(dot)sontakke(at)enterprisedb(dot)com>, Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Subject: Re: HOT for PostgreSQL 8.3
Date: 2007-02-10 02:28:53
Message-ID: 200702100228.l1A2Sr308300@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-02-10 02:44:36 Re: Variable length varlena headers redux
Previous Message Jeremy Drake 2007-02-10 00:33:38 Re: patch adding new regexp functions