Re: Dead Space Map

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Dead Space Map
Date: 2006-02-28 17:59:05
Message-ID: 87y7zvxt3q.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:

> 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?

If you commit each update then your tuple might well be visible to other
transactions, how would you check that?

I originally thought you meant if you are repeatedly updating the same record
within the same transaction. In that case sure you could reuse the space but
a) only if it's big enough for the new record and b) how often do you really
do that?

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-02-28 18:00:11 Re: Dead Space Map
Previous Message Kevin Grittner 2006-02-28 17:55:32 Re: [PERFORM] temporary indexes