mvcc and lock

Поиск
Список
Период
Сортировка
От postgresql
Тема mvcc and lock
Дата
Msg-id 200303190807.AA51970282@rdb01.pku.edu.cn
обсуждение исходный текст
Список pgsql-hackers
Hi all
I have read some code on transaction part.
When the new transaction starts, it record the snapshot of database containing the current transaction id,etc. So
dependingon the snapshot
 
, the transaction decide which tuple is visible.
But transaction could also be implemented by lock. so I am not sure how 
the transaction is implemented, by MVCC or Lock, or by both?
In my option, when tuple is processed in readonly mode(select), MVCC is enough. but when tuple is changed, lock is
used.I am not sure
 
whether the explanation is correct.
Thanks for any comments.
Best regards.
josh 




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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: cursors outside transactions
Следующее
От: Mike Meyer
Дата:
Сообщение: Threaded Python vs. PostGreSQL plpython