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 -> Re: Why is undo backed with redo for GTT

Re: Why is undo backed with redo for GTT

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Thu, 6 Mar 2003 23:24:08 +1000
Message-ID: <TNG9a.61410$jM5.157006@newsfeeds.bigpond.com>


"Tanel Poder" <tanel@@peldik.com> wrote in message news:3e668581$1_2_at_news.estpak.ee...
> Hi!
>
> > Try considering this...
> >
> > The undo/rollback segments reside in a tablespace,
> > just like tables & indexes. When an INSERT, UPDATE
> > or DELETE occurs, one or more blocks in a table
> > changes, zero or more blocks in an index change, one
> > or more blocks in the undo change AND every change
> > MUST be recorded in the redo logfile for safe keeping.
> > Otherwise they could not be recovered (rolled forward
> > and if uncommitted rolled back) after a crash.
>
> The point was, that the changes do *not* have to be recorded in redo,
> because we are dealing with temporary tables here (which don't have to
> survive the crash) but Oracle just hasn't (yet) built a mechanism, which
> distinguishes whether the undo should to be logged or not (the mechanism
> works in other areas such as nologging index rebuild or CTAS), but this is
> block level, not change vector level logging afaik..
>
> So redo is generated for undo even if the relevant undo doesn't need to be
> reconstucted after a crash.
>
> Actually, rollback segments should just be fine, if temp table DML undo
> wouldn't be logged, thus leaving few unneeded blocks in RBS to a
> inconsistent state - rolling back is done walking through the undo chain
> anyway and if we just pass rolling back transactions on transactions on
(non
> existent) temp tables after crash, we shouldn't encounter any problems.
>
> Sorry, if my post is too confusing, it's quite late here ;)
> Tanel.

Hi Tanel,

I know where you're coming from but the point is that as it causes changes to the *undo* tablespace, Oracle requires the redo for these changes to ensure the associates files can be recovered to a consistent state. But I agree it's all somewhat fundamentally unnecessary.

Me, if I was designing how GTT handled undo, I would implement a "deferred-like" undo segment(s) for the GTT that is stored in the temp tablespace so that associated undo would not require the generation of redo.

That said, I can immediately think of half a dozen reasons why this isn't practical, explaining why I'm not an Oracle developer ...

Cheers

Richard Received on Thu Mar 06 2003 - 07:24:08 CST

Original text of this message

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