SlideShare a Scribd company logo
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 1
Active / Active Database Solutions with Log
Based Replication in xDB 6.0
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 2
•  xDB Overview
−  Features
−  Use Cases
−  Components of a Multi Master Replication System
•  Supporting Active / Active Database Solutions with xDB 6.0
−  Faster and more efficient replication with log-based Multi Master replication for
Postgres Plus and PostgreSQL
−  Easier to configure publication tables in bulk with pattern matching selection rules
−  Ensuring High Availability with integration of the 'Control Schema’
−  Improved performance in conflict detection rules
Agenda
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 3
xDB is a highly flexible database
replication tool to address multiple
problem sets
What is xDB?
Multi Master: Consolidated view from any node
and multiple conflict detection / resolution rules
•  Write Availability & Scalability
•  Warm Standby
•  Localized Data Access
Single Master: Heterogeneous (Oracle, SQL
Server, PG, PPAS) & filtered data sources
•  Offload Reporting or BI Queries from the
OLTP system
•  Migrate or test systems at low cost
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 4
Features
•  Distributed Publication / Subscription
Architecture
•  Snapshot and continuous synchronization
modes
•  Replicate one or more tables
•  Define and apply row filters
•  Flexible replication scheduler
•  Supports cascading replication
•  Replication History Viewer
•  Graphical Console and CLI
Use Cases
•  Write Availability
•  Write Scalability
•  Warm Standby Servers
•  Localized Data Access
•  Offloading Reporting and Business
Intelligence Queries
•  Testing Systems in Parallel
•  Migrating Data
xDB Feature Highlights
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 5
Why xDB over other
replication tools?
•  Rich graphical management console
−  complete control over your replication system
−  a history viewer
−  a replication scheduler
•  Command line operations suitable for scripting.
•  Multi-Master is an ideal solution for geographically
dispersed data centers or co-located redundant data
sets. It provides a critical component of a 24x7 near
zero downtime maintenance operation.
•  Single Master Heterogeneous Sources provide
integration and a path to reduce other license and
maintenance costs
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 6
•  Publication Server & Configuration Files:
−  Java application; configures publication database and
master nodes for replication; performs replication.
•  Controller database (Can be any Master Node):
−  Primary provider of the replication system information
to the publication server.
−  Must be first one running and accessible to publication
server; can be set to any node.
•  Master Definition Node
−  First node added to the MMR system
−  Table definitions and optionally initial data to publish
−  Role can be reassigned
•  Master Node
−  Replicated & updatable data stores
•  More Info in Documentation Section 2.3.1.x – Physical
Components of xDB system
Architecture and Physical Components of xDB MMR
xDB is a set of programs + datastores containing configuration information and metadata
that form a replication system.
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 7
•  xDB Overview
−  Features
−  Use Cases
−  Components of a Multi Master Replication System
•  Supporting Active / Active Database Solutions with xDB 6.0
−  Faster and more efficient replication with log-based Multi Master replication for
Postgres Plus and PostgreSQL
−  Easier to configure publication tables in bulk with pattern matching selection
rules
−  Ensuring High Availability with integration of the 'Control Schema’
−  Improved performance in conflict detection rules
Agenda
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 8
•  Changes to rows in the source tables are
extracted from the Write-Ahead Log
segments (WAL files).
•  xDB connects via walsender interface.
Changes are streamed on continuous
basis. Eliminates need to poll.
•  The extracted changes are converted to
an in-memory data structure and applied
to the target tables by means of SQL
statements executed using JDBC.
•  See Documentation section 2.2.10 for
information on the log-based method.
Faster and more efficient replication with log-based
MMR for PPAS & PG 9.4
Capture data changes without impacting the online transaction processing rate
High-level architecture of how xDB communicates with database
server to fetch logical changes.
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 9
•  Changes to rows in the source tables are
extracted from the Write-Ahead Log
segments (WAL files).
•  xDB connects via walsender interface.
Changes are streamed on continuous
basis. Eliminates need to poll.
•  The extracted changes are converted to
an in-memory data structure and applied
to the target tables by means of SQL
statements executed using JDBC.
•  See Documentation section 2.2.10 for
information on the log-based method.
Faster and more efficient replication with log-based
MMR for PPAS & PG 9.4
Capture data changes without impacting the online transaction processing rate
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 10
•  When you have a lot of tables to choose
from when building your publication, the
wildcard selection dialog is a useful tool
•  Here we see a few examples
−  % as a wildcard character to identify all
tables of the _gb designation
−  [character lists] to identify more patterns
with specific characters
•  Detailed Help is available in the client
•  See Documentation section 7.1 for
information on the wildcard selector UI.
Easier to Configure Publication Tables in Bulk
Use sophisticated pattern matching rules to identify tables for publication
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 11
•  In an xDB MMR systems, if any master goes
offline, remaining nodes continue to synchronize
amongst themselves.
•  When an offline master is brought back, pending
transactions are synchronized.
•  Each node serves as a backup of other nodes*
•  As part of the Control Schema integration project,
normal replication configuration (control tables,
procedures/functions, sequences…) and history
tables are also replicated amongst master nodes.
•  Thus, there is resiliency built into the system such
that you could lose any database node and
replication operations will continue
•  See Documentation 6.11 for more information
*Keep care when using Table Filters, as some nodes may not have all data
replicated onto it.
Ensuring High Availability
Control
Schema
Control
Schema
Control
Schema
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 12
•  There is however special significance of the
Controller Database
−  Publication server accesses it for configuration
information
−  So any changes made to system config using GUI
or CLI is done on Controller DB first
•  For planned maintenance
−  You can identify a different node to be your
Controller using the GUI Console or CLI
•  For unplanned maintenance
−  Edit the xDB Configuration file to contain
connection information of another master node
−  Restart publication server.
−  You can now use the CLI or GUI tool to connect to,
monitor and manage the replication system.
•  See Documentation 6.11 for more information
Ensuring High Availability
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 13
•  xDB 5.x conflict detection query is
based on IN clause for doing the
comparison of PK attribute(s).
•  i.e. SELECT s.* FROM
_edb_replicator_pub.rrst_public_orders
WHERE order_id IN (1,5,10,15,20,21);
•  Performance starts to degrade as table
grows or if PK type is not numeric.
•  We replaced the existing query with a
‘common table expression’ optimize the
query execution time.
•  i.e. WITH temp_table AS (SELECT…
Improved Performance in Conflict Detection
Over 100x improvement with large tables and non-numeric PK
Internal Testing: Create table and seed 10
million rows of text data
create table x (t text not null);

insert into x select md5(n::text)
from (select generate_series(1,
10000000)) w(n);
Show timing with old and new algorithm
timing on
test=# select xdb60_style();

--Time: 3,629.105 ms (3 seconds)

test=# select xdb51_style();

--Time: 2,198,287.369 ms (36
minutes!)
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 14
•  Active / Active Databases with fast and efficient log based replication and
high performance conflict detection algorithms
•  Pattern matching selection rules make it easier to configure publication
tables in bulk
•  Simple High Availability is now possible with integration of the 'Control
Schema’
Summary – xDB 6.0 Enables New Replication Solutions!
© Copyright EnterpriseDB Corporation, 2015. All rights reserved. 15

More Related Content

What's hot (20)

PDF
Zero Data Loss Recovery Applianceによるデータベース保護のアーキテクチャ
オラクルエンジニア通信
 
PDF
Apache tinkerpopとグラフデータベースの世界
Yuki Morishita
 
ODP
Introduction to PostgreSQL
Jim Mlodgenski
 
PDF
Grafana 7.0
Juraj Hantak
 
PPSX
Sharding MySQL with Vitess
Harun KÜÇÜK
 
PPTX
Couchbase 101
Dipti Borkar
 
PDF
patroni-based citrus high availability environment deployment
hyeongchae lee
 
PPTX
Migrating Data and Databases to Azure
Karen Lopez
 
PDF
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Mydbops
 
PDF
[B31] LOGMinerってレプリケーションソフトで使われているけどどうなってる? by Toshiya Morita
Insight Technology, Inc.
 
PDF
Apache Kuduを使った分析システムの裏側
Cloudera Japan
 
PPTX
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)
NTT DATA Technology & Innovation
 
PDF
Oracle data guard for beginners
Pini Dibask
 
PPT
Cassandraのしくみ データの読み書き編
Yuki Morishita
 
PDF
監査ログをもっと身近に!〜統合監査のすすめ〜
Michitoshi Yoshida
 
PPTX
A Beginner's Guide to Building Data Pipelines with Luigi
Growth Intelligence
 
PPTX
An Introduction To NoSQL & MongoDB
Lee Theobald
 
PDF
Apache Spark Overview
Vadim Y. Bichutskiy
 
PDF
The basics of fluentd
Treasure Data, Inc.
 
PPTX
SQL Server High Availability and Disaster Recovery
Michael Poremba
 
Zero Data Loss Recovery Applianceによるデータベース保護のアーキテクチャ
オラクルエンジニア通信
 
Apache tinkerpopとグラフデータベースの世界
Yuki Morishita
 
Introduction to PostgreSQL
Jim Mlodgenski
 
Grafana 7.0
Juraj Hantak
 
Sharding MySQL with Vitess
Harun KÜÇÜK
 
Couchbase 101
Dipti Borkar
 
patroni-based citrus high availability environment deployment
hyeongchae lee
 
Migrating Data and Databases to Azure
Karen Lopez
 
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Mydbops
 
[B31] LOGMinerってレプリケーションソフトで使われているけどどうなってる? by Toshiya Morita
Insight Technology, Inc.
 
Apache Kuduを使った分析システムの裏側
Cloudera Japan
 
Kubernetesでの性能解析 ~なんとなく遅いからの脱却~(Kubernetes Meetup Tokyo #33 発表資料)
NTT DATA Technology & Innovation
 
Oracle data guard for beginners
Pini Dibask
 
Cassandraのしくみ データの読み書き編
Yuki Morishita
 
監査ログをもっと身近に!〜統合監査のすすめ〜
Michitoshi Yoshida
 
A Beginner's Guide to Building Data Pipelines with Luigi
Growth Intelligence
 
An Introduction To NoSQL & MongoDB
Lee Theobald
 
Apache Spark Overview
Vadim Y. Bichutskiy
 
The basics of fluentd
Treasure Data, Inc.
 
SQL Server High Availability and Disaster Recovery
Michael Poremba
 

Viewers also liked (8)

PPTX
X-DB Replication Server and MMR
Ashnikbiz
 
PDF
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Masao Fujii
 
PDF
Enterprise PostgreSQL - EDB's answer to conventional Databases
Ashnikbiz
 
PPTX
kafka for db as postgres
PivotalOpenSourceHub
 
PDF
Logical Replication in PostgreSQL - FLOSSUK 2016
Petr Jelinek
 
PDF
Multimaster
Stas Kelvich
 
PDF
Streaming replication in practice
Alexey Lesovsky
 
PDF
Troubleshooting PostgreSQL Streaming Replication
Alexey Lesovsky
 
X-DB Replication Server and MMR
Ashnikbiz
 
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Masao Fujii
 
Enterprise PostgreSQL - EDB's answer to conventional Databases
Ashnikbiz
 
kafka for db as postgres
PivotalOpenSourceHub
 
Logical Replication in PostgreSQL - FLOSSUK 2016
Petr Jelinek
 
Multimaster
Stas Kelvich
 
Streaming replication in practice
Alexey Lesovsky
 
Troubleshooting PostgreSQL Streaming Replication
Alexey Lesovsky
 
Ad

Similar to Active/Active Database Solutions with Log Based Replication in xDB 6.0 (20)

PDF
Introduction to Postrges-XC
Ashutosh Bapat
 
PDF
Top10 list planningpostgresdeployment.2014
EDB
 
PPTX
PPCD_And_AmazonRDS
Vibhor Kumar
 
PPTX
EDB Database Servers and Tools
Ashnikbiz
 
PDF
Whats new in_postgres_enterprise_db_20130124
EDB
 
PPTX
Enterprise-class security with PostgreSQL - 2
Ashnikbiz
 
PDF
Confoo 202 - MySQL Group Replication and ReplicaSet
Dave Stokes
 
PDF
Introducing Postgres Enterprise Manager 5.0
EDB
 
PDF
Best Practices for a Complete Postgres Enterprise Architecture Setup
EDB
 
PDF
Pgxc scalability pg_open2012
Ashutosh Bapat
 
PDF
Top 10 Tips for an Effective Postgres Deployment
EDB
 
PDF
Postgres Integrates Effectively in the "Enterprise Sandbox"
EDB
 
PDF
EDB Postgres Replication Server
EDB
 
PPTX
EDB: Power to Postgres
Ashnikbiz
 
ODP
MySQL Cluster
Abel Flórez
 
PPTX
Postgres survey podcast
inside-BigData.com
 
PDF
What to expect from MariaDB Platform X5, part 1
MariaDB plc
 
PDF
Public Sector Virtual Town Hall
EDB
 
PDF
Introduction to MySQL Cluster
Abel Flórez
 
PDF
COUG_AAbate_Oracle_Database_12c_New_Features
Alfredo Abate
 
Introduction to Postrges-XC
Ashutosh Bapat
 
Top10 list planningpostgresdeployment.2014
EDB
 
PPCD_And_AmazonRDS
Vibhor Kumar
 
EDB Database Servers and Tools
Ashnikbiz
 
Whats new in_postgres_enterprise_db_20130124
EDB
 
Enterprise-class security with PostgreSQL - 2
Ashnikbiz
 
Confoo 202 - MySQL Group Replication and ReplicaSet
Dave Stokes
 
Introducing Postgres Enterprise Manager 5.0
EDB
 
Best Practices for a Complete Postgres Enterprise Architecture Setup
EDB
 
Pgxc scalability pg_open2012
Ashutosh Bapat
 
Top 10 Tips for an Effective Postgres Deployment
EDB
 
Postgres Integrates Effectively in the "Enterprise Sandbox"
EDB
 
EDB Postgres Replication Server
EDB
 
EDB: Power to Postgres
Ashnikbiz
 
MySQL Cluster
Abel Flórez
 
Postgres survey podcast
inside-BigData.com
 
What to expect from MariaDB Platform X5, part 1
MariaDB plc
 
Public Sector Virtual Town Hall
EDB
 
Introduction to MySQL Cluster
Abel Flórez
 
COUG_AAbate_Oracle_Database_12c_New_Features
Alfredo Abate
 
Ad

More from EDB (20)

PDF
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
EDB
 
PDF
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
EDB
 
PDF
Migre sus bases de datos Oracle a la nube
EDB
 
PDF
EFM Office Hours - APJ - July 29, 2021
EDB
 
PDF
Benchmarking Cloud Native PostgreSQL
EDB
 
PDF
Las Variaciones de la Replicación de PostgreSQL
EDB
 
PDF
NoSQL and Spatial Database Capabilities using PostgreSQL
EDB
 
PDF
Is There Anything PgBouncer Can’t Do?
EDB
 
PDF
Data Analysis with TensorFlow in PostgreSQL
EDB
 
PDF
Practical Partitioning in Production with Postgres
EDB
 
PDF
A Deeper Dive into EXPLAIN
EDB
 
PDF
IOT with PostgreSQL
EDB
 
PDF
A Journey from Oracle to PostgreSQL
EDB
 
PDF
Psql is awesome!
EDB
 
PDF
EDB 13 - New Enhancements for Security and Usability - APJ
EDB
 
PPTX
Comment sauvegarder correctement vos données
EDB
 
PDF
Cloud Native PostgreSQL - Italiano
EDB
 
PDF
New enhancements for security and usability in EDB 13
EDB
 
PPTX
Best Practices in Security with PostgreSQL
EDB
 
PDF
Cloud Native PostgreSQL - APJ
EDB
 
Cloud Migration Paths: Kubernetes, IaaS, or DBaaS
EDB
 
Die 10 besten PostgreSQL-Replikationsstrategien für Ihr Unternehmen
EDB
 
Migre sus bases de datos Oracle a la nube
EDB
 
EFM Office Hours - APJ - July 29, 2021
EDB
 
Benchmarking Cloud Native PostgreSQL
EDB
 
Las Variaciones de la Replicación de PostgreSQL
EDB
 
NoSQL and Spatial Database Capabilities using PostgreSQL
EDB
 
Is There Anything PgBouncer Can’t Do?
EDB
 
Data Analysis with TensorFlow in PostgreSQL
EDB
 
Practical Partitioning in Production with Postgres
EDB
 
A Deeper Dive into EXPLAIN
EDB
 
IOT with PostgreSQL
EDB
 
A Journey from Oracle to PostgreSQL
EDB
 
Psql is awesome!
EDB
 
EDB 13 - New Enhancements for Security and Usability - APJ
EDB
 
Comment sauvegarder correctement vos données
EDB
 
Cloud Native PostgreSQL - Italiano
EDB
 
New enhancements for security and usability in EDB 13
EDB
 
Best Practices in Security with PostgreSQL
EDB
 
Cloud Native PostgreSQL - APJ
EDB
 

Recently uploaded (20)

PPTX
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
PPTX
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PPTX
Engineering the Java Web Application (MVC)
abhishekoza1981
 
PPTX
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PPTX
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PDF
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Tally software_Introduction_Presentation
AditiBansal54083
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Engineering the Java Web Application (MVC)
abhishekoza1981
 
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
Executive Business Intelligence Dashboards
vandeslie24
 
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 

Active/Active Database Solutions with Log Based Replication in xDB 6.0

  • 1. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 1 Active / Active Database Solutions with Log Based Replication in xDB 6.0
  • 2. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 2 •  xDB Overview −  Features −  Use Cases −  Components of a Multi Master Replication System •  Supporting Active / Active Database Solutions with xDB 6.0 −  Faster and more efficient replication with log-based Multi Master replication for Postgres Plus and PostgreSQL −  Easier to configure publication tables in bulk with pattern matching selection rules −  Ensuring High Availability with integration of the 'Control Schema’ −  Improved performance in conflict detection rules Agenda
  • 3. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 3 xDB is a highly flexible database replication tool to address multiple problem sets What is xDB? Multi Master: Consolidated view from any node and multiple conflict detection / resolution rules •  Write Availability & Scalability •  Warm Standby •  Localized Data Access Single Master: Heterogeneous (Oracle, SQL Server, PG, PPAS) & filtered data sources •  Offload Reporting or BI Queries from the OLTP system •  Migrate or test systems at low cost
  • 4. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 4 Features •  Distributed Publication / Subscription Architecture •  Snapshot and continuous synchronization modes •  Replicate one or more tables •  Define and apply row filters •  Flexible replication scheduler •  Supports cascading replication •  Replication History Viewer •  Graphical Console and CLI Use Cases •  Write Availability •  Write Scalability •  Warm Standby Servers •  Localized Data Access •  Offloading Reporting and Business Intelligence Queries •  Testing Systems in Parallel •  Migrating Data xDB Feature Highlights
  • 5. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 5 Why xDB over other replication tools? •  Rich graphical management console −  complete control over your replication system −  a history viewer −  a replication scheduler •  Command line operations suitable for scripting. •  Multi-Master is an ideal solution for geographically dispersed data centers or co-located redundant data sets. It provides a critical component of a 24x7 near zero downtime maintenance operation. •  Single Master Heterogeneous Sources provide integration and a path to reduce other license and maintenance costs
  • 6. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 6 •  Publication Server & Configuration Files: −  Java application; configures publication database and master nodes for replication; performs replication. •  Controller database (Can be any Master Node): −  Primary provider of the replication system information to the publication server. −  Must be first one running and accessible to publication server; can be set to any node. •  Master Definition Node −  First node added to the MMR system −  Table definitions and optionally initial data to publish −  Role can be reassigned •  Master Node −  Replicated & updatable data stores •  More Info in Documentation Section 2.3.1.x – Physical Components of xDB system Architecture and Physical Components of xDB MMR xDB is a set of programs + datastores containing configuration information and metadata that form a replication system.
  • 7. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 7 •  xDB Overview −  Features −  Use Cases −  Components of a Multi Master Replication System •  Supporting Active / Active Database Solutions with xDB 6.0 −  Faster and more efficient replication with log-based Multi Master replication for Postgres Plus and PostgreSQL −  Easier to configure publication tables in bulk with pattern matching selection rules −  Ensuring High Availability with integration of the 'Control Schema’ −  Improved performance in conflict detection rules Agenda
  • 8. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 8 •  Changes to rows in the source tables are extracted from the Write-Ahead Log segments (WAL files). •  xDB connects via walsender interface. Changes are streamed on continuous basis. Eliminates need to poll. •  The extracted changes are converted to an in-memory data structure and applied to the target tables by means of SQL statements executed using JDBC. •  See Documentation section 2.2.10 for information on the log-based method. Faster and more efficient replication with log-based MMR for PPAS & PG 9.4 Capture data changes without impacting the online transaction processing rate High-level architecture of how xDB communicates with database server to fetch logical changes.
  • 9. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 9 •  Changes to rows in the source tables are extracted from the Write-Ahead Log segments (WAL files). •  xDB connects via walsender interface. Changes are streamed on continuous basis. Eliminates need to poll. •  The extracted changes are converted to an in-memory data structure and applied to the target tables by means of SQL statements executed using JDBC. •  See Documentation section 2.2.10 for information on the log-based method. Faster and more efficient replication with log-based MMR for PPAS & PG 9.4 Capture data changes without impacting the online transaction processing rate
  • 10. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 10 •  When you have a lot of tables to choose from when building your publication, the wildcard selection dialog is a useful tool •  Here we see a few examples −  % as a wildcard character to identify all tables of the _gb designation −  [character lists] to identify more patterns with specific characters •  Detailed Help is available in the client •  See Documentation section 7.1 for information on the wildcard selector UI. Easier to Configure Publication Tables in Bulk Use sophisticated pattern matching rules to identify tables for publication
  • 11. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 11 •  In an xDB MMR systems, if any master goes offline, remaining nodes continue to synchronize amongst themselves. •  When an offline master is brought back, pending transactions are synchronized. •  Each node serves as a backup of other nodes* •  As part of the Control Schema integration project, normal replication configuration (control tables, procedures/functions, sequences…) and history tables are also replicated amongst master nodes. •  Thus, there is resiliency built into the system such that you could lose any database node and replication operations will continue •  See Documentation 6.11 for more information *Keep care when using Table Filters, as some nodes may not have all data replicated onto it. Ensuring High Availability Control Schema Control Schema Control Schema
  • 12. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 12 •  There is however special significance of the Controller Database −  Publication server accesses it for configuration information −  So any changes made to system config using GUI or CLI is done on Controller DB first •  For planned maintenance −  You can identify a different node to be your Controller using the GUI Console or CLI •  For unplanned maintenance −  Edit the xDB Configuration file to contain connection information of another master node −  Restart publication server. −  You can now use the CLI or GUI tool to connect to, monitor and manage the replication system. •  See Documentation 6.11 for more information Ensuring High Availability
  • 13. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 13 •  xDB 5.x conflict detection query is based on IN clause for doing the comparison of PK attribute(s). •  i.e. SELECT s.* FROM _edb_replicator_pub.rrst_public_orders WHERE order_id IN (1,5,10,15,20,21); •  Performance starts to degrade as table grows or if PK type is not numeric. •  We replaced the existing query with a ‘common table expression’ optimize the query execution time. •  i.e. WITH temp_table AS (SELECT… Improved Performance in Conflict Detection Over 100x improvement with large tables and non-numeric PK Internal Testing: Create table and seed 10 million rows of text data create table x (t text not null);
 insert into x select md5(n::text) from (select generate_series(1, 10000000)) w(n); Show timing with old and new algorithm timing on test=# select xdb60_style();
 --Time: 3,629.105 ms (3 seconds)
 test=# select xdb51_style();
 --Time: 2,198,287.369 ms (36 minutes!)
  • 14. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 14 •  Active / Active Databases with fast and efficient log based replication and high performance conflict detection algorithms •  Pattern matching selection rules make it easier to configure publication tables in bulk •  Simple High Availability is now possible with integration of the 'Control Schema’ Summary – xDB 6.0 Enables New Replication Solutions!
  • 15. © Copyright EnterpriseDB Corporation, 2015. All rights reserved. 15