Illustrations of the Refresh Operation
Page 3 of 3

Timelines

The following two illustrations ( Figure 1-2 and Figure 1-3) show the state of a target and the source at different times: after an update at the target, during a refresh, and after a refresh.

The queries applied at the target are shown on the target's timeline. The circles on the timelines represent events, such as when a transaction is committed or when a refresh is issued. The boxes represent the content of tables at the given time. An asterisk (*) after an entry in a table means this value is from a provisional transaction. Values without asterisks are durable.

A Simple Scenario

Figure 1-2 shows a very simple scenario:

  1. Two simple inserts to a single table commit at the target.
  2. The target issues a refresh, which is successful.
  3. The transactions are applied at the source and become durable at the target.

Figure 1-2 A simple synchronization scenario

A Slightly More Complicated Synchronization Scenario

Figure 1-3 shows a slightly more complicated synchronization scenario than the one in Figure 1-2:

  1. Two simple inserts commit at the target.
  2. The target issues a refresh. One of the transactions fails at the source because of a check constraint.
  3. Before the reply comes back from the first refresh operation, a different connection to the target completes a transaction.
  4. After the refresh returns, the provisional transaction that succeeded at the source becomes durable at the target, and the provisional transaction that failed at the source is removed from the user tables and written to the error log.
  5. A subsequent refresh sends the "stranded" transaction to the source. This transaction succeeds at the source and then becomes durable at the target.

Figure 1-3 A slightly more complicated synchronization scenario