Thanks for the question, Brad.
Asked: September 01, 2022 - 3:30 pm UTC
Last updated: September 07, 2022 - 3:42 am UTC
Viewed 10K+ times! This question is
I looked at v$flashback_database_log and noted there were 300+ logs and all of them except the oldest had a "TYPE" of NORMAL. The oldest log had a type of "RESERVED". That confuses me, and the doc that is supposed to explain what the values in the TYPE column mean is unhelpful -- Doc ID 2351182.1. That doc says "Reserved is the next log file that will be used". What does "used" mean in this context?
The entire explanation in that doc is as follows:
The four status types are:
-- "Normal" is just what it means a normal log file.
-- "Reserved" is the next log file that will be used.
-- "Free" is just that the log is free to be used.
-- "To delete" means the log will deleted when the FRA need space.
Can you shed some light on this?
and Connor said...
My understanding is its about how we manage old flashback log files, and how we plan to write a new one.
Is this answer out of date? If it is, please let us know via a Comment
Lets say you're running out of space in your recovery area and you're running in "normal" operation, ie, you don't have any restore points etc etc. Then over time we are going to physically delete flashback logs because we need to reclaim the space. Similarly, since we want to keep all of these logs, when we need a new one, we are going create one with a brand new name.
However, consider a different scenario where we are easily meeting our flashback retention target and we have plenty of free space. Then in those cases, we don't necessarily need to *delete* an old file because we don't need to get the space back. We can just re-purpose it for a newer log. So a log named "ABC" that was initially written on say Sep 3rd, which is now beyond our flashback target, could be re-used with the same name ABC but now represents flashback info for Sep 7 not Sep 3 anymore.
Now because we're going to reuse a name, *before* we actually start using it, we want to *reserve* it, ie, have somewhere for the "new" flashback log to be written into. In the first case, where we are tight for space, you won't see it, because we are not reusing names, we are creating new ones.