Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Redo Log Mechanics Question

Re: Redo Log Mechanics Question

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 10 Jun 1999 18:04:00 GMT
Message-ID: <376ffd9e.25353576@newshost.us.oracle.com>


A copy of this was sent to Roger Westbrook <rwestbrook_at_dollargeneral.com> (if that email address didn't require changing) On Thu, 10 Jun 1999 12:41:45 -0500, you wrote:

>My understanding of how the redo log system works must be missing
>something because I don't understand what good it could do for recovery.
>
>Here's what I think I know; Uncommitted transactions are stored in the
>Redo Log Buffer until a commit, a checkpoint, a LGWR timeout, or 2/3rds
>full. LGWR then flushes everything to the online Redo Log Files. When
>a Redo Log Group is full there is a log switch. This kicks off a
>checkpoint. A checkpoint causes all dirty db buffers covered by the log
>to be flushed to datafiles.
>
>Here's what I don't understand... what happens to an UNcommited
>transaction? If a transaction is uncommitted at the time of a Log
>Buffer flush then it sounds like it gets written to the Redo Log Files.
>If it's still uncommitted at the time of a log switch then what
>happens? Will it eventually be overwritten as the Redo Log Files come
>full circle and that particular group gets overwritten? Am I correct in
>assuming that this would make instance recovery impossible?
>
>Thanks in advance!
>Roger Westbrook
>sidhe_at_home.net

You forgot about rollback segments.

redo = redo
rollback = undo

rollback is logged. When we recover, we recover the rollback segments as well. they get rolled forward. after applying all redo logs, we discover some un-committed transactions -- no problem, we roll them back from the rollback we just recovered....

so, the redo can get overwritten as long as the undo (and data) has been checkpointed. we can always rollback from the rollback back. we'll roll forward from the redo (catching up the rollback)

See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'... Mirrored (and more current) at http://govt.us.oracle.com/~tkyte/

Current article is "Fine Grained Access Control", added June 8'th  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA
--
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Jun 10 1999 - 13:04:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US