Skip site navigation (1) Skip section navigation (2)

Re: Dead Space Map

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "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:32:38
Message-ID: 200602281732.k1SHWcl20274@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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?

-- 
  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. +

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2006-02-28 17:33:33
Subject: Re: new feature: LDAP database name resolution
Previous:From: Tom LaneDate: 2006-02-28 17:30:46
Subject: Re: [HACKERS] how solve diff of API counstruct_md_array between

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group