4 Replies Latest reply: Jun 23, 2009 9:00 AM by 486215 RSS

    Doubts regarding cache fusion - PI(Past Image) in RAC

    486215
      We are configuring Oracle 10.2.0.4 2-node RAC database on Linux x86_64

      I was going through Oracle documentation and a few books which were discussing about cache fusion (read-read, read-write, write-write, write-read behaviour) etc.

      It was mentioned that row locking is similar to that of single instance so whevever a block is needed a instance completes its operation on the block and transfers the block to the other instance which needs exclusive access.
      What I understood is once the transaction is completed the first instance transfers the block to the other instance to have exclusive access to that block.

      Also the first instance retains a PI(Past Image) of the block which it can use for read operations but it cannot modify the block as it has transferred the block to other instance and it only has shared access.

      Now when a checkpoint occurs all the instances should purge their PI's so in that case if the first instance is in the middle of a select statement which uses the PI of the block what will heppen to the query, will it result in an error(something like snapshot too old) ?

      I am not able to understand the PI concept and what happens during flushing the data blocks to the disk.
        • 1. Re: Doubts regarding cache fusion - PI(Past Image) in RAC
          damorgan
          Above all there is multiversion read consistency.

          You can only see what has been committed before you began your transaction.

          The commit will have a higher SCN and has no affect on a SELECT that began running at an earlier point in time.
          • 2. Re: Doubts regarding cache fusion - PI(Past Image) in RAC
            486215
            Does it mean multiversion read consistency doesn't have anything to do with PI ?

            Multiversion read consistency is a part of even a single instance database so what is the use of having a PI in RAC ?

            Since a specific instance has done some changes and then has transmitted the block which means a new SCN would have been created which in turn means multiple versions of the block exists which is similar to single instance database.

            So what I don't understand is what is the significance of the Past Image here ?
            • 3. Re: Doubts regarding cache fusion - PI(Past Image) in RAC
              Jonathan Lewis
              Praba wrote:

              So what I don't understand is what is the significance of the Past Image here ?
              A PI (past image) is a copy of the block that is known to have existed as a current (CU) version of the block at some point in time in the past - so it can be used as the start point for recovery if the node that holds the current block crashes. So PI blocks can reduce recovery time in the database.

              I believe PI blocks can also be used by the holder of the PI to generate local CR copies without reference to the DRM - if the SCNs are appropriate. So PIs can also be used interconnect traffic.

              Initially there was a rule that when a node wrote the current block it had to send a message to all other nodes mark their PI copies as free buffers (in effect, forget them) - although I did see a note on one occasion that Oracle might change this to convert PI blocks to CR blocks.

              Regards
              Jonathan Lewis
              http://jonathanlewis.wordpress.com
              http://www.jlcomp.demon.co.uk

              "For every expert there is an equal and opposite expert."
              Arthur C. Clarke
              • 4. Re: Doubts regarding cache fusion - PI(Past Image) in RAC
                486215
                Thanks Jonathan.

                I didn't think from recovery point of view actually I was thinking with respect to cache fusion perspective.