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

Home -> Community -> Usenet -> c.d.o.server -> undo and redo

undo and redo

From: Santhosh Kumar <brsanthu_at_yahoo.com>
Date: 13 Oct 2003 08:02:22 -0700
Message-ID: <9daf2a44.0310130702.69ea37b5@posting.google.com>


Hello All,

Sometimes I really get confused about the flow of data w.r.t undo (rollback) and redo although
I'm pretty clear about the intentions of undo and redo data structures.

Let us say, table T (with one column C) as got value V (only one row). Now user issue following statement:

UPDATE TABLE T SET C = M My understanding of data flow in this scenario is,

  1. Oracle brings the block with value V to buffer cache
  2. Copies the block to undo section in the buffer cache
  3. Updates the original block to value M in the buffer cache
  4. Writes the modified value from data section of buffer cache to 1st redo block in redo pool
  5. Writes the modified value from undo section of buffer cache to 2nd redo block in redo pool

Graphical representation of the above steps is as follows.


Data section        Undo section            Redo Pool
of Buffer cache     of buffer cache    block 1    block 2
------------------------------------------------------------

|-------| |-------| |-------| |-------|
| V | | ? | | ? | | ? |
|-------| |-------| |-------| |-------|
------------------------------------------------------------
|-------| |-------| |-------| |-------|
| V | | V | | ? | | ? |
|-------| |-------| |-------| |-------|
------------------------------------------------------------
|-------| |-------| |-------| |-------|
| M | | V | | ? | | ? |
|-------| |-------| |-------| |-------|
------------------------------------------------------------
|-------| |-------| |-------| |-------|
| M | | V | | M | | ? |
|-------| |-------| |-------| |-------|
------------------------------------------------------------
|-------| |-------| |-------| |-------|
| M | | V | | M | | V |
|-------| |-------| |-------| |-------|
------------------------------------------------------------

Please correct if my understanding is wrong.

Thanks in advance,
Santhosh. Received on Mon Oct 13 2003 - 10:02:22 CDT

Original text of this message

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