Home » Server Options » RAC & Failsafe » PastImage concep (11,12, Linux)
PastImage concep [message #645363] |
Fri, 04 December 2015 06:53  |
 |
piotrtal
Messages: 168 Registered: June 2011 Location: Poland/Czestochowa
|
Senior Member |
|
|
Hello Gurus,
let me paste quote from http://www.dba-oracle.com/real_application_clusters_rac_grid/past_image.htm
########
The past image concept was introduced in the RAC version of Oracle 9i to maintain data integrity. In an Oracle database, a typical data block is not written to the disk immediately, even after it is dirtied. When the same dirty data block is requested by another instance for write or read purposes, an image of the block is created at the owning instance, and only that block is shipped to the requesting instance. This backup image of the block is called the past image (PI) and is kept in memory. In the event of failure, Oracle can reconstruct the current version of the block by reading PIs. It is also possible to have more than one past image in the memory depending on how many times the data block was requested in the dirty stage.
A past image copy of the data block is different from a CR block, which is needed for reconstructing a read-consistent image. A CR version of a block represents a consistent snapshot of the data at a point in time. It is constructed by applying information from the undo/rollback segments. The PI image copy helps the recovery process and aids in maintaining data integrity.
For example, suppose user A of instance 1 has updated row 2 on block 5. Later, user B of instance 2 intends to update row 6 on the same block 5. The GCS transfers block 5 from instance A to instance B. At this point, the past image (PI) for block 5 is created on instance A.
#########
my question is about details of above:
1. We have InstanceA and InstanceB.
2. InstanceB is currently modifying block (no commit yet)
3. When InstanceA request block for modification, PI is created on InstanceB and block is sent to InstanceA
and from that moment I have question.
q1) Which block is send to InstanceA? - PI or currently being modified (dirty one)?
q2) And what with its existence on InstanceB? - it is being moved or copied from InstanceB into InstanceA ?
Thanks
Piotr
|
|
|
|
|
|
|
|
|
Re: PastImage concep [message #645375 is a reply to message #645373] |
Fri, 04 December 2015 09:04   |
John Watson
Messages: 8976 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
piotrtal wrote on Fri, 04 December 2015 14:57John,
CR is clear for me, but PI not. CR is for read consistency. PI appears only i RAC.
That is why I asked about details of this PI cration process and raised those two questions.
So PI means exact copy of modified block, and InstanceB from that moment has two the same blocks which does not differ.
Thanks for answering so far. I will try process this and back in case of concerns.
Piotr How many more times do I have to say that the block becomes a PI block when it has been transferred? Of course B doesn't create another copy. The PI is just sitting there, probably just a waste of space.
[Updated on: Fri, 04 December 2015 09:05] Report message to a moderator
|
|
|
|
|
Re: PastImage concep [message #645378 is a reply to message #645374] |
Fri, 04 December 2015 09:20   |
 |
J.Schnackenberg
Messages: 2 Registered: June 2015
|
Junior Member |
|
|
John Watson wrote on Fri, 04 December 2015 16:01I had a look at the docs, Jan, and yes, they do say "...The GCS manages past images and the GCS also uses them in failure recovery...." which is what Julian Dyke repeats. Do you actually believe it? I cannot visualize how a PI would be used for any form of recovery. It exists only in memory, not on disc.
I'm really, really unsure about the details here, but yes, I do believe it. Keep in mind, this PI will only be kept until the block is flushed to disk by some other instance. If there are only two instances, Instance A has a PI-block, Instance B (which has the newest version of the block) crashes. Now Instance A can read the redo from Instance B and apply it directly to this PI. No need to also read the block itself. So yes, it's a failure recovery. For one block this might seem irrelevant, but usually we'll have lot's of blocks in memory and in RAC there'll usually be quite a bit of these PIs floating around. The less optimized an application is for RAC, the more there'll be. And for recovery from an instance crash, when lot's of sessions will try to connect to the remaining instance, you'll want to do this crash recovery as fast as possible.
Quote:By the way, that Julian Dyke presentation is horrific: 106 slides! Death by Powerpoint!!
I referred to it, I didn't say I like it.
Regards,
Jan
|
|
|
|
|
Goto Forum:
Current Time: Sun May 04 12:53:10 CDT 2025
|