mvcc & DML on the same row

Поиск
Список
Период
Сортировка
От matteo durighetto
Тема mvcc & DML on the same row
Дата
Msg-id AANLkTikU9GVTAK9weE_XW4V_OFjFfg4t3uHpE8sa-i68@mail.gmail.com
обсуждение исходный текст
Ответы Re: mvcc & DML on the same row  (Robert Haas <robertmhaas@gmail.com>)
Re: mvcc & DML on the same row  (Nicolas Barbier <nicolas.barbier@gmail.com>)
Re: mvcc & DML on the same row  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Hi,   I have an idea about mvcc and different DML of the same row in the
same transaction.
Normally when a backend do an unpdate on a row ( call it X ) , we done
an insert and logical delete on this row  (0,1,2..N are the "version
of the row) :
  X0  (delete "old" row)  X1  (insert  "new" row)

if  we continue the transaction and we do for example another update
on this row (X) , we again redo the same operation:
  X0  (deleted "old" row)  X1  (row inserted, NOW deleted) => not needed for rollback  X2  (insert "new" row  )


But why we need all these versions of the same row on table, if for
rollback we need only the original row X (X0) ?

So I think we need it in memory, not on physical space of table (ok
there is the cache, but ..) or something similar, or this method is
for transaction with isolation level at "read uncommited"?

Kind Regards

Matteo Durighetto

-----------------------

desmodemone@gmail.com
m.durighetto@miriade.it


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Segfault related to pg_authid when running initdb from git master
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Segfault related to pg_authid when running initdb from git master