Is this a better MVCC.

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

I just had an interesting idea. It sounds too easy to beleve, but hear me out
and correct me if I'm wrong.

Currently, during update, PostgreSQL takes the existing record, modifyies it,
and adds it as a new row. The previous record has a pointer to the new version.
If the row is updated twice, the original row is hit first, followed by the
next version, then the last version. Do I understand this correctly?

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? (Space permitting, of course.) That way,
performance does not degrade over time, also Vacuum should be easier and less
combersome because it simply lops off the end of the list, and mark tuples
which are not in any transaction path.

Is this a lot of work, is it inherently wrong?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2002-04-16 12:41:19 Testers needed ...
Previous Message Mario Weilguni 2002-04-16 12:02:38 Re: Improved vacuumlo