Re: Index on two columns not used - Mailing list pgsql-performance

From Markus Schaber
Subject Re: Index on two columns not used
Date
Msg-id 453DDD00.3000503@logix-tt.com
Whole thread Raw
In response to Re: Index on two columns not used  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
Hi, Tom,

Tom Lane wrote:

> You're wrong.  An UPDATE always writes a new version of the row (if it
> overwrote the row in-place, it wouldn't be rollback-able).  The new
> version has a different TID and therefore the index entry must change.
> To support MVCC, our approach is to always insert a new index entry
> pointing at the new TID --- the old one remains in place so that the old
> version can still be found by transactions that need it.

OK, good you corrected me.

I had the weird impression that both row versions have the same tuple ID
(as they are different versions of the same tuple), and so an index
change is not necessary when both versions fit on the same page.

Thanks,
Markus

--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org

pgsql-performance by date:

Previous
From: Stuart Bishop
Date:
Subject: Re: Slow functional indexes?
Next
From: Jignesh Shah
Date:
Subject: Re: Copy database performance issue