Great discussion !!!


Quote Originally Posted by janki_mehta
Does this mean that there is no situation when DBWn writes uncommitted data to disk..coz if during checkpoint, if only bufferes related to redo log files are return to disk...then since redo log files always hold committed data(LGWR writes data from redo log buffer to redo log file on commit)-- so there is no case of writing uncommitted data to disk or what?????????
I don't think that is what he is saying at all;

DBWn will write to disk dirty blocks during a checkpoint. A dirty block is one that has been modified in memory and is not currently on disk. This includes uncommitted data.

Redo Log files hold change vectors for the modified blocks. They do not particularly distinguish between committed/uncommitted data. Only Changes to blocks this includes not only your table data blocks but also Undo blocks. (thats how it can rebuild the undo tablespace and perform transaction rollback).

The commit command guarantees that what your transaction has posted to the log buffers is on disk. The responsiblity for the write operation is LGWR. The commit command will not return until LGWR has flushed the log buffer to disk.

LGWR at the time of your commit will also write any other changes that are in the log buffers. These changes can be from other users and may or may not be completed transactions (ie committed).


HTH