How do I implement MVCC?
I have located many resources on the web giving general overviews of MVCC (multi-version concurrency control) concepts, but no detailed technical references on exactly how it should work or be implemented. Are there any documents online, or books offline, that contain enough theory (and a bit of practical help, ideally) on which to base an implementation? I wish to emulate more or less what PostgreSQL does.
(For info I will be implementing it in SAS using SAS/Share - which provides some locking primitives and concurrent read/write access to the underlying data store, but nothing in the way of transaction isolation or proper DBMS features. If anyone is familiar with SAS/Share and thinks this is an impossible task, please shout!)
Transaction Processing: Concepts and Techniques and Transactional Information Systems: Theory, Algorithms, and the Practice of Concurrency Control and Recovery are authoritative source of transaction processing.
Both these books are also mentioned in PostgreSQL Wiki.
I wrote a blog post about how MVCC works in PostgreSQL. Basically, a table in PostgreSQL can sore multiple versions of the same row.
More, there are two additional columns:
The update is done by deleting and inserting a new record, and the VACUUM process collects the old versions that are not longer in use.
I wrote a blog post about this:
https://elliot.silvrback.com/implementing-your-own-transactions-with-mvcc
链接地址: http://www.djcxy.com/p/5184.html上一篇: 使用高度图扭曲图像?
下一篇: 我如何实现MVCC?