insert into sym_channel (channel_id, processing_order, max_batch_size, max_batch_to_send, max_data_to_route, extract_period_millis, batch_algorithm, enabled, description, contains_big_lob) values ('cb-multimaster', 2, 50000, 1000, 500000, 0, 'default', 1, 'All tables for multi-master replication', 1); insert into sym_node_group (node_group_id, description) values ('cloudband1', 'PostgreSQL Master #1'); insert into sym_node_group (node_group_id, description) values ('cloudband2', 'PostgreSQL Master #2'); insert into sym_node_group_link (source_node_group_id, target_node_group_id, data_event_action) values ('cloudband1', 'cloudband2', 'W'), ('cloudband2', 'cloudband1', 'P'); insert into sym_node (node_id, node_group_id, external_id, sync_enabled) values ('cloudband-001', 'cloudband1', 'cloudband-001', 1); insert into sym_node_identity values ('cloudband-001'); insert into sym_router (router_id, source_node_group_id, target_node_group_id, create_time, last_update_time) values ('pgmaster1-2-pgmaster2', 'cloudband1', 'cloudband2', current_timestamp, current_timestamp), ('pgmaster2-2-pgmaster1', 'cloudband2', 'cloudband1', current_timestamp, current_timestamp); -- NOTE: By David Edery. -- The trigger_id field has a limitation of 50 characters -- Do not exceed this limitation or else we will not have replication at all!!! -- nil = "no initial load" -- nor = "no online replication" -- nr = "no replication" at all... -- fr = "full replication" insert into sym_trigger (trigger_id, source_schema_name, source_table_name, channel_id, use_capture_lobs, sync_on_update, sync_on_insert, sync_on_delete, last_update_time, create_time) values ('fr', 'public', '*,!dep_v22_alerts,!dep_v22_alert_resource_reference,!dep_V24_cloud_node_security_group_rule,!dep_V24_security_group_rule', 'cb-multimaster', 1, 1, 1, 1, current_timestamp, current_timestamp), ('fr_initial_load_marker', 'public', 'initial_load_marker', 'cb-multimaster', 1, 1, 1, 1, current_timestamp, current_timestamp), ('nor_databasechangelog', 'public', 'databasechangelog', 'cb-multimaster', 1, 0, 0, 0, current_timestamp, current_timestamp), ('nor_databasechangeloglock', 'public', 'databasechangeloglock', 'cb-multimaster', 1, 0, 0, 0, current_timestamp, current_timestamp), ('nr_metric_data', 'public', 'metric_data', 'cb-multimaster', 1, 0, 0, 0, current_timestamp, current_timestamp), ('nr_routing_metric_data', 'public', 'routing_metric_data', 'cb-multimaster', 1, 0, 0, 0, current_timestamp, current_timestamp), ('nil_bss_entity', 'public', 'bss_entity', 'cb-multimaster', 1, 0, 0, 0, current_timestamp, current_timestamp), ('nil_audit_event', 'public', 'audit_event', 'cb-multimaster', 1, 0, 0, 0, current_timestamp, current_timestamp), ('nil_hourly_monitoring_hierarchy', 'public', 'hourly_monitoring_hierarchy', 'cb-multimaster', 1, 1, 1, 1, current_timestamp, current_timestamp), ('nil_daily_monitoring_hierarchy', 'public', 'daily_monitoring_hierarchy', 'cb-multimaster', 1, 1, 1, 1, current_timestamp, current_timestamp), ('nil_hourly_network_utilization_hierarchy', 'public', 'hourly_network_utilization_hierarchy', 'cb-multimaster', 1, 1, 1, 1, current_timestamp, current_timestamp); insert into sym_trigger_router (trigger_id, router_id, create_time, last_update_time, last_update_by, initial_load_order ) values ('fr', 'pgmaster1-2-pgmaster2', current_timestamp, current_timestamp, 'ncos', 9999), ('fr', 'pgmaster2-2-pgmaster1', current_timestamp, current_timestamp, 'ncos', 9999), ('nor_databasechangelog', 'pgmaster1-2-pgmaster2', current_timestamp, current_timestamp, 'ncos', 9999), ('nor_databasechangelog', 'pgmaster2-2-pgmaster1', current_timestamp, current_timestamp, 'ncos', 9999), ('nor_databasechangeloglock', 'pgmaster1-2-pgmaster2', current_timestamp, current_timestamp, 'ncos', 9999), ('nor_databasechangeloglock', 'pgmaster2-2-pgmaster1', current_timestamp, current_timestamp, 'ncos', 9999), ('fr_initial_load_marker', 'pgmaster1-2-pgmaster2', current_timestamp, current_timestamp, 'ncos', 10000), ('fr_initial_load_marker', 'pgmaster2-2-pgmaster1', current_timestamp, current_timestamp, 'ncos', 10000), ('nr_metric_data', 'pgmaster1-2-pgmaster2', current_timestamp, current_timestamp, 'ncos', -1), ('nr_metric_data', 'pgmaster2-2-pgmaster1', current_timestamp, current_timestamp, 'ncos', -1), ('nr_routing_metric_data', 'pgmaster1-2-pgmaster2', current_timestamp, current_timestamp, 'ncos', -1), ('nr_routing_metric_data', 'pgmaster2-2-pgmaster1', current_timestamp, current_timestamp, 'ncos', -1), ('nil_bss_entity', 'pgmaster1-2-pgmaster2', current_timestamp, current_timestamp, 'ncos', -1), ('nil_bss_entity', 'pgmaster2-2-pgmaster1', current_timestamp, current_timestamp, 'ncos', -1), ('nil_audit_event', 'pgmaster1-2-pgmaster2', current_timestamp, current_timestamp, 'ncos', -1), ('nil_audit_event', 'pgmaster2-2-pgmaster1', current_timestamp, current_timestamp, 'ncos', -1), ('nil_hourly_monitoring_hierarchy', 'pgmaster1-2-pgmaster2', current_timestamp, current_timestamp, 'ncos', -1), ('nil_hourly_monitoring_hierarchy', 'pgmaster2-2-pgmaster1', current_timestamp, current_timestamp, 'ncos', -1), ('nil_daily_monitoring_hierarchy', 'pgmaster1-2-pgmaster2', current_timestamp, current_timestamp, 'ncos', -1), ('nil_daily_monitoring_hierarchy', 'pgmaster2-2-pgmaster1', current_timestamp, current_timestamp, 'ncos', -1), ('nil_hourly_network_utilization_hierarchy', 'pgmaster1-2-pgmaster2', current_timestamp, current_timestamp, 'ncos', -1), ('nil_hourly_network_utilization_hierarchy', 'pgmaster2-2-pgmaster1', current_timestamp, current_timestamp, 'ncos', -1); insert into sym_conflict (conflict_id, source_node_group_id, target_node_group_id, detect_type, resolve_type, ping_back, create_time, last_update_time) values ('conflict_policy_1_2', 'cloudband1', 'cloudband2', 'USE_PK_DATA', 'FALLBACK', 'SINGLE_ROW', current_timestamp, current_timestamp), ('conflict_policy_2_1', 'cloudband2', 'cloudband1', 'USE_PK_DATA', 'FALLBACK', 'SINGLE_ROW', current_timestamp, current_timestamp); insert into sym_parameter (external_id, node_group_id, param_key, param_value, create_time, last_update_by, last_update_time) values ('cloudband-001', 'cloudband1', 'routing.wait.for.data.timeout.seconds', 3600, current_timestamp, 'set_ha', current_timestamp), ('cloudband-002', 'cloudband2', 'routing.wait.for.data.timeout.seconds', 3600, current_timestamp, 'set_ha', current_timestamp), ('cloudband-001', 'cloudband1', 'http.timeout.ms', 120000, current_timestamp, 'set_ha', current_timestamp), ('cloudband-002', 'cloudband2', 'http.timeout.ms', 120000, current_timestamp, 'set_ha', current_timestamp), ('cloudband-001', 'cloudband1', 'pull.thread.per.server.count', 10, current_timestamp, 'set_ha', current_timestamp), ('cloudband-002', 'cloudband2', 'pull.thread.per.server.count', 10, current_timestamp, 'set_ha', current_timestamp), ('cloudband-001', 'cloudband1', 'push.thread.per.server.count', 10, current_timestamp, 'set_ha', current_timestamp), ('cloudband-002', 'cloudband2', 'push.thread.per.server.count', 10, current_timestamp, 'set_ha', current_timestamp); ;