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 ?
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 .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With