Techniques are provided for guaranteed undo retention. The techniques
include a database server attempting to store undo information in undo
storage. In order to store the undo information, the database server may
overwrite expired undo records; write to empty undo extents; allocate new
undo extents and write to the newly-allocated extents; or overwrite
unexpired undo records that do not have guaranteed undo retention. If an
undo record does not have guaranteed undo retention, then the undo record
may be overwritten before the expiration time has elapsed. If no undo
extent is empty or unallocated, and if all of the undo records are
unexpired and have guaranteed undo retention, then the database system
has, at least temporarily, run out of usable and reusable space and an
error may be reported to an appropriate party.