reuse redo log about rollback [message #53907] |
Wed, 16 October 2002 19:09 |
shen jie
Messages: 1 Registered: October 2002
|
Junior Member |
|
|
at specific time, DBWn write all dirty buffer in buffer cache to datafile, this event is called checkpoint. during log switch,when checkpoint completed, this log file can be reused.
but,i have a question,
because the logfile maybe include uncommited transaction info,when this log file be reused, how can we rollback the uncommitted transaction?
best regards
shenjie
|
|
|
Re: reuse redo log about rollback [message #53912 is a reply to message #53907] |
Thu, 17 October 2002 01:23 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
redologs store only the redo-information.
undo-information or the rollback information in stored in Rollback segment anyhow..
Before DBWn can write a modified buffer, all redo records associated with the changes to the buffer must be written
to disk (the write-ahead protocol). If DBWn finds that some redo records have not been written, it signals LGWR to
write the redo records to disk and waits for LGWR to complete writing the redo log buffer before
it can write out the data buffers.
When a user issues a COMMIT statement, LGWR puts a commit record in the redo log buffer and writes it to disk
immediately, along with the transaction's redo entries.
The corresponding changes to data blocks are deferred until it is more efficient to write them.
This is called a fast commit mechanism. The atomic write of the redo entry containing the transaction's
commit record is the single event that determines the transaction has committed.
Oracle returns a success code to the committing transaction,
even though the data buffers have not yet been written to disk.
|
|
|