After reading from several resources including this, this, this and this, I have concluded the following:
- The effects of any transaction are written to the log buffer in the memory.
- Commit flushes the log buffer to the logfiles in the disk.
- On the occurance of a Checkpoint, DBW writes the dirty blocks to datafiles on the basis of logfile entries.
- In the event of a crash, the Recovery Manager reads the logfiles (till the last checkpoint) and perfoms Undo/Redo on the transactions.
I understand that the committed transactions are redone and uncommitted transactions are undone.
What I don’t understand is how are uncommitted transactions known, given that they exist only in the log buffer in the memory and any crash is supposed to wipe-out the memory and the only surviving transactions are those residing in the logfiles on the disk (after getting committed). Is something wrong in my understanding?