Table of Contents Previous Next


6 Multi-Master Replication Operation : 6.2 Creating a Publication

Step 1: Make sure the database server for the master definition node is running and accepting client connections.
Step 2: Select the MMR type node under the Publication Server node. From the Publication menu, choose Publication Database, and then choose Add Database. Alternatively, click the secondary mouse button on the MMR type node and choose Add Database. The Publication Service – Add Database dialog box appears.
Step 3: Fill in the following fields:
Database Type. Select PostgreSQL or Postgres Plus Advanced Server for the master definition node. For an Advanced Server Oracle compatible installation, select the Postgres Plus Advanced Server option. For PostgreSQL or an Advanced Server PostgreSQL compatible installation, select the PostgreSQL option.
Host. IP address of the host on which the master definition node is running.
Port. Port on which the master definition node is listening for connections.
User. The database user name for the master definition node created in Step 1 of Section 6.1.3.
Password. Password of the database user.
Database. Enter the database name of the master definition node.
URL Options (For SSL connectivity). Enter the URL options to establish SSL connectivity to the master definition node. See Section 7.11 for information on using SSL connections.
Changeset Logging (For Postgres). Select Table Triggers to use the trigger-based method of synchronization replication. Select WAL Stream to use the log-based method of synchronization replication. See Section 2.2.9 for information on the trigger-based method. See Section 2.2.10 for information on the log-based method.
Node Priority Level. An integer from 1 to 10, which is the priority level assigned to this master node for conflict resolution based on node priority. The highest priority is 1 while the lowest is 10. See Section 6.6.4 for information on conflict resolution strategies. The default is 1 for the master definition node.
Step 4: Click the Test button. If Test Result: Success appears, click the OK button, then click the Save button.
The label MDN appears at the end of the node in the replication tree and in addition, the MDN field is set to Yes in the Property window to indicate this is the master definition node.
Step 1: Select the Publication Database node. From the Publication menu, choose Create Publication. Alternatively, click the secondary mouse button on the Publication Database node and choose Create Publication. The Create Publication dialog box appears.
Step 2: Fill in the following fields under the Create Publication tab:
Publication Name. Enter a name that is unique amongst all publications.
Publish. Check the boxes next to the tables that are to be included in the publication. Alternatively or in addition, click the Use Wildcard Selection button to use wildcard pattern matching for selecting publication tables.
Select All. Check this box if you want to include all tables in the Available Tables list in the publication.
Use Wildcard Selection. Click this button to use the wildcard selector to choose tables for the publication. See Section 7.1 for information on the wildcard selector.
Step 3 (Optional): Table filters consist of a set of filter rules that control the selection criteria for rows replicated between master nodes during a snapshot or a synchronization replication.
Note: See Section 2.2.12.3 for table setup requirements for a log-based replication system as well as general restrictions on the use of table filters.
A filter rule consists of a filter name and a SQL WHERE clause (omitting the WHERE keyword) called the filter clause, which you specify for a table that defines the selection criteria for rows that are to be included during a replication.
In the following example a filter rule is defined on the dept table so only rows where the deptno column contains 10, 20, or 30 are included in replications. All other rows are excluded from replication.
The following shows a rule added to the emp table by choosing edb.emp from the Table/View drop-down list and then entering the selection criteria for only rows with deptno containing 10 in the Filter dialog box.
Repeating this process, additional filter rules can be added for the emp table. The following shows the complete set of available filter rules defined for the dept and emp tables.
Note: To enable table filters on the master definition node under which you are currently creating the publication, you must first switch the role of the master definition node to a different master node (see Section 6.10), and then follow the directions in Section 6.9 to enable the table filters.
Step 4 (Optional): If you want to modify or see the current conflict resolution options, click the Conflict Resolution Options tab. For each table, you can select the primary conflict resolution strategy and a standby strategy by clicking the primary mouse button over the appropriate box to expose a drop-down list of choices.
Earliest Timestamp. The conflicting change with the earliest timestamp is accepted and replicated to all other master nodes. All other conflicting changes are discarded.
Latest Timestamp. The conflicting change with the latest timestamp is accepted and replicated to all other master nodes. All other conflicting changes are discarded.
Node Priority. The conflicting change occurring on the master node with the highest priority level is accepted and replicated to all other master nodes. All other conflicting changes are discarded.
Custom. Update/update conflicts are resolved with a PL/pgSQL custom conflict handling program.
Manual. The conflict remains unresolved. Conflicting changes remain applied in each master node where they originated, but are not replicated to other master nodes. The proper adjustments must be manually applied in each master node.
See Section 6.6.4 for more information on conflict resolution strategies.
Step 5: If you expect update/update conflicts, then set the REPLICA IDENTITY option to FULL on those tables where the conflicts are expected to occur. See Section 6.6.1 for additional information.
Step 6: Click the Create button. If Publication Created Successfully appears, click the OK button, otherwise investigate the error and make the necessary corrections.

6 Multi-Master Replication Operation : 6.2 Creating a Publication

Table of Contents Previous Next