Re: how things happen in a commit process to redo log files
Date: Fri, 16 May 2008 21:38:26 +0200
On Fri, 16 May 2008 14:59:13 GMT, pellicleundies_at_hotmail.com (obakesan) wrote:
>as I understand things when a change occurs something writes the change
>from the database buffer cache to the redo log buffer. Then upon commit (I
>suppose its) LGWR copies these changes from the redo log buffer into the redo
>log files. But does it also write the rollback segment relevant to the
>If so, I'm not sure I see why it might be needed?
>(when bandwidth gets better ;-)
>Photographer, Programmer Motorcyclist and dingbat
>please remove undies for reply
I don't think so.
One thing to notice is the undo segment (rollback segments are a thing from the past but work the same) contains the before image (ie the record before the change) and is an *ordinary data segment*, so changes to that segment go to the log buffer.
The log buffer is written when it's one third dirty or when 1M is
dirty, whichever occurs first.
The log buffer is always written before the data files are written. As the undo segment is an ordinary data segment this applies to the undo segment too.
Upon commit everything is synchronised, a commit marker is placed in
the redolog, and the space in the undo segment is released : ie the
transaction info is removed, and the segment is a candidate to be
However, at rollback you would have needed the undo segment. You need to write the undo segment to the redo log files in order to survive system crash. During crash recovery uncommitted transactions are rolled back using the undo segments and the redo log files.
-- Sybrand Bakker Senior Oracle DBAReceived on Fri May 16 2008 - 14:38:26 CDT