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: understanding rollback segments

Re: understanding rollback segments

From: Steve Adams <steveadams_at_acslink.net.au>
Date: 1997/05/02
Message-ID: <336a1d5d.245569@nntp.peg.apc.org>#1/1

On 29 Apr 1997 10:01:35 GMT, Dave Wotton <Dave.Wotton_at_it.camcnty.gov.uk> wrote:
[ snip ]
>My confusion about allocating transactions to extents comes in part from
>a paragraph in the otherwise excellent "Oracle: Advanced Tuning and
>Administration" by Eyal Aronoff, Kevin Loney and Noorali Sonawalla and
>published by Oracle Press. In Chapter 5, page 104 it says:
>
> "Ideally, each transaction would be stored in its own rollback
> segment. Since that is not likely to be the case, each
> transaction should be able to be stored in its own extent.
> Create extents that are large enough to support most of the
> transactions without wrapping."
>
>Unless I've misunderstood, this seems pure gobbledygook: I've always
>understood that transactions MUST be stored in their own rollback
>segments - so the first sentence seems unnecessary,and the first part
>of the second sentence is simply wrong. The second part of the second
>sentence seems like nonsense if you assume the preceding sentence is
>true. Also if, as you say, and which I accept, transactions share
>rollback extents, how on earth can you size them to fit most
>transactions? There will always be cases where transactions are assigned
>to extents which are already nearly full. It was in trying to rationalise
>this paragraph that I started to believe the each transaction used its
>own extent of the RBS.

I guess that the authors intended, "Ideally, each transaction will have a rollback segment to itself, without having to share it with another transaction. Since that is not likely to be the case ...". I discussed the idea of each transaction having its own extent with a colleague some months ago, and was told that in the past (version 4?) this was in fact the case, and that later (version 5?) it was still possible for a transaction to claim exclusive use of an extent. This may be where their confusion is coming from. I'd be interested if anyone else can confirm or clarify the history.

Anyhow, the case nowadays is clearly that when transactions share a rollback segment, the segment header contains a pointer to the 'current extent', and whenever a transaction needs to use a new undo block, it must take it from the current extent, or cause the rollback segment to 'wrap' into another extent. So, other than immediately after a wrap when some transactions are still writing to the last block that they had allocated in the formerly current extent, and other transactions are already writing to the new current extent, all transactions in a rollback segment write to different blocks in the same current extent.

Interestingly, this applies to recursive transactions against the rollback segment itself too. Prior to a wrap, one block is reserved for the undo that might be generated by a recursive transaction to extend or shrink the rollback segment itself. If that space is exhausted, then the ORA-1581 error is likely to be raised. However, the more likely cause of that error is that two transaction sharing a rollback segment both run out of space in the current extent simultaneously (on different CPUs) and while one tries to extend the rollback segment, the other tries to use the new extent that it not yet fully allocated and gets this error. According to Oracle Support, my workaround of ensuring that there are enough rollback segments to avoid rollback segment sharing, is the only known way to address this problem. So these authors have in fact (inadvertently) said some useful amid all the "gobbledygook".

Steve Adams Received on Fri May 02 1997 - 00:00:00 CDT

Original text of this message

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