Re: Is this a better MVCC.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: mlw <markw(at)mohawksoft(dot)com>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is this a better MVCC.
Date: 2002-04-16 13:15:31
Message-ID: 11445.1018962931@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

mlw <markw(at)mohawksoft(dot)com> writes:
> Now, what if we did it another way, copy the old version of the row into the
> new row and update the tuple in place?

I don't think we can get away with moving the extant tuple. If we did,
a concurrent scan that should have found the old tuple might miss it.
(This is why VACUUM FULL needs exclusive lock to move tuples.)

It's fairly unclear whether this would actually buy any performance
gain, anyway. In the case of a seqscan I don't see that it makes any
difference on average, and in the case of an indexscan what matters is
the index ordering not the physical location. (In this connection,
btree indexes already do the "right thing", cf comments for
_bt_insertonpg.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Sherry 2002-04-16 13:26:35 Re: Testers needed ...
Previous Message Tom Lane 2002-04-16 13:08:09 Re: multibyte support by default