Re: Dead Space Map

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Dead Space Map
Дата
Msg-id 200602281744.k1SHiTf22200@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Dead Space Map  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: Dead Space Map  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Heikki Linnakangas wrote:
> On Tue, 28 Feb 2006, Bruce Momjian wrote:
> 
> > Tom Lane wrote:
> >> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> >>> Tom Lane wrote:
> >>>> MVCC goes out the window, eh?  Not to mention transaction rollback ability?
> >>
> >>> If the old row is not visible to any transactions, why would it not work?
> >>
> >> The old row is ALWAYS visible to somebody, until you commit (if you ever
> >> do).  You can't simply overwrite existing data.
> >
> > Huh, I am not suggesting overwriting tuples you created, but tuples
> > created by earlier transactions and now invisible to everyone.
> >
> > I should be clearer.  Suppose you have a table with a single index on
> > the primary key.  You are updating the row over and over again (a
> > typical case).  You create the first row, commit, then it is updated
> > (two copies), commit, then you update it again.  That first created row
> > might not be visible to anyone, but has the same index value as the new
> > row you are about to add.  Why not reused that heap tuple?
> 
> Index tuples have commit info hint bits in them, don't they? You would 
> still have to update those.

Right, but consider that we would have to use the index to find the
matching reusable heap to begin with, so we could clear the hint bit.

--  Bruce Momjian   http://candle.pha.pa.us SRA OSS, Inc.   http://www.sraoss.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Dead Space Map
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Dead Space Map