Postgres Plus xDB Replication Server with Multi-Master User's Guide : 7.3 Viewing Replication History
Postgres Plus Advanced Server xDB Replication Server User's Guide
7.3 Viewing Replication History
A summary of replications performed on each subscription or master node can be viewed in the xDB Replication Console. A detailed replication history showing each insert, update, and deletion made against each target table can be viewed as well. See Section 18.104.22.168 for a discussion on how changes are applied to target tables.
Note (For SMR Only): The replication history can be viewed from the Publication node as well as from the Subscription node. The history shown for a Publication node is actually the exact same set of inserts, updates, and deletions made on the subscription tables by the publication server during synchronization. The history shown for a Publication node does not show the actual SQL statements processed on the publication tables that originated from user applications.
Note (For MMR only): The replication history can be viewed from the Publication node under any master node in the multi-master replication system. The history shown includes inserts, updates, and deletions made on all publication tables of all master nodes by the publication server during synchronization, and hence, the history appears the same regardless of the master node under which the history is viewed.
Replication history shows the following types of events that occur on a given subscription or master node:
● Snapshot replications
● Synchronization replications where at least one change (insert, update, or deletion) was applied to a target table
● Synchronization replications where no updates were applied to any of the target tables since the last restart of the publication server
The following steps describe how to view the replication history of the events in the preceding list.
Step 1 (For SMR only): Select the node beneath the Subscription node. Tabs labeled General, Realtime Monitor, and Replication History appear.
Figure 179 - Selecting a subscription on which to view replication history
Step 1 (For MMR only): Select any Publication node under a Database node representing a master node. Tabs labeled General, Realtime Monitor, Replication History, and Conflict History appear.
Figure 180 - Selecting a publication on which to view replication history
Step 2: Click the Replication History tab to show a history of replications.
Figure 181 - Replication History tab
Note: Every snapshot replication and each synchronization replication with at least one update produces a history record that is maintained in replication history tables in the _edb_replication_pub schema of the xDB Control database. Over time the size of the replication history tables will grow. Replication history records can be periodically deleted. See Section 7.4.3 for information on cleaning up replication history.
You may notice synchronization replications with transaction counts of zero. These records indicate that there were no changes to synchronize at the time the replication occurred. For scheduled replications that occur frequently, this may result in a large number of lines in the Replication History tab, thus obscuring the more meaningful replications with non-zero transaction counts as shown below.
Figure 182 - Replication history with zero transaction counts
While viewing the Replication History tab, you can hide the records with zero transaction counts as follows:
Step 1: Check the Show History With Transactions Count > 0 check box located at the bottom of the Replication History tab.
Figure 183 - Setting replication history to hide zero transaction count records
Step 2: The next time the Replication History tab refreshes, only the replications with non-zero transaction counts appear in the Replication History.
● Hiding of zero transaction count replication records stays in effect only while viewing the Replication History tab after checking the Show History With Transactions Count > 0 check box. If you change the focus in the replication tree to another node, zero transaction count records reappear on the Replication History tab when you come back to it.
● Zero transaction count replication records are maintained in the publication server memory. They are not permanently stored on disk. Therefore when the publication server is shut down, the in-memory zero transaction count replication records are no longer available. When the publication server starts running again, zero transaction count replication records will appear on the Replication History tab as zero transaction count replications occur.
Expanding the nodes under the Subscription node of a single-master replication system, or the Publication node of a multi-master replication system provides more information about the subscription or publication.
Step 1: Select a table to reveal tabs that contain general information about the table and the replication history of the table. Expand a Table node to reveal the columns in the table.
Figure 184 - Table properties and columns
Step 2: Click the Replication History tab to show a history of replications for this table.
Figure 185 - Table replication history tab
Step 3: Click the View Data link to show a list of each change made to the table during the synchronization replication. The Synchronize History window shows two update operations followed by one insert operation against the emp target table that correspond to the following set of SQL statements executed on the emp source table:
UPDATE emp SET hiredate = TO_DATE('07-JUN-12'), mgr = 7698 WHERE empno IN (9001, 9002); INSERT INTO emp (empno, ename, job, mgr, deptno) VALUES (9003, 'JOHNSON', 'SALESMAN', 7698, 30);
Figure 186 - Synchronize History window
Note: Since all insert, update, and delete operations on all source tables are recorded in shadow tables, the size of the shadow tables may grow considerably over time for volatile source tables. The rows shown in the Synchronize History window are obtained from these shadow tables. Rows in the shadow tables can be periodically deleted. See Section 7.4.2 for information on cleaning up the shadow tables.