Re: Redo for the Undo

  • From: Jonathan Lewis <jlewisoracle@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 15 Dec 2023 23:05:49 +0000

Possibly the difficulty in figuring it out comes from the following:
  "since roll forward will generate the related undo anew"

Rolling forward simply reads and applies a set of redo change vectors,
ensuring that either all or none of the redo change vectors in a single
redo change record are applied.  (Oracle may skip a load of redo change
records at the start of the first (archived) redo log file being used, but
once it has started applying records a failed records will cause the roll
forward to terminate.)

Applying a redo change vector to a table block does NOT result in any undo
being generated. The undo for that table block change is written into the
correct block in the undo tablespace because the redo record holding the
redo change vector for the table will also hold a redo change vector for
the undo record originally generated by the change to the table.

Regards
Jonathan Lewis



On Fri, 15 Dec 2023 at 08:04, Lothar Flatz <l.flatz@xxxxxxxxxx> wrote:

Hi Mladen,

thanks. Got that. Having a hard time to figure why this would be needed.
I guess after a database crash when you restore a backup the before
images prior to the restore point might be missing. Therefore roll
forward will reinstall them in order to be able to cope this flash back.
Other than that I see no reason for it since roll forward will generate
the related undo anew.

Or, probably more generally speaking, restore should reconstruct the
database state in its whole, not leaving out parts (like undo).

Thanks

Lothar



Am 13.12.2023 um 15:34 schrieb Mladen Gogala:
On 12/13/23 07:53, Lothar Flatz wrote:
Hi,

can a conventional delete produce redo for undo? And why? What I
don't get: if the redo is applied, undo would be generated anyway,
would it not?

But maybe my idea of roll forward is a bit simplistic. Not really my
area of expertise.

Thanks

Lothar

--
//www.freelists.org/webpage/oracle-l


Hi Lothar,

Delete changes blocks, UNDO blocks among other things.  REDO mechanism
protects the UNDO tablespace as well and generally writes any block
change to the UNDO tablespace.

Regards

--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com

--
//www.freelists.org/webpage/oracle-l



Other related posts: