What do DBMSs that implement multi-version timestamp ordering for concurrency control usually include in their write-ahead logs ? before and after images, or one of them ? timestamps ? what else ?
-
1Pick an implementation and see the technical docs? Postgres uses a form of MVCC and has rather good detailed documentation IIRC ... not sure about Firebird or other open engines that can be poked around in. – Mar 06 '11 at 08:23
2 Answers
Documentation of Postgres WAL. Postgres uses MVTO type of MVCC. InnoDB uses MVRC.
Here is Postgres log structure and pg_control structure, which is important for the recovery. Timestamps are not used as its not reliable, rather they use monotonically increasing integer counter (transaction id).
So all the rollback related data is stored in main data itself, not in WAL.
Main purpose of WAL is to recover data incase of problems due to power failure, OS problems or some hardware failure (obviously except serious disk failures). So WAL should be pretty much independent of that.
Innodb log structure is in innodb/include/log0log.h .

- 232,980
- 40
- 330
- 338

- 8,150
- 3
- 29
- 36
-
-
In your earlier question which I answered I gave you one link (http://simpledbm.googlecode.com/files/mvcc-survey-1.0.pdf). This explains both the algos of MVCC, postgres uses MVTO and InnoDB/Oracle uses MVRC. – Zimbabao Mar 07 '11 at 04:37
-
1
Thank you pst. I found this article to be one of the best so far: http://answers.oreilly.com/topic/2035-whats-new-in-sqlite-37/

- 2,649
- 4
- 32
- 59
-
Available through the Wayback Machine: https://web.archive.org/web/20130901070810/http://answers.oreilly.com/topic/2035-whats-new-in-sqlite-37/ – Mathieu Rey Jun 13 '19 at 01:54