Help Center/ GaussDB/ Distributed_8.x/ Logical Replication
Updated on 2024-06-07 GMT+08:00

Logical Replication

In GaussDB:

Data can be periodically synchronized to heterogeneous databases (such as Oracle databases) by using data migration tools but cannot be replicated in real time. As such, real-time data synchronization with heterogeneous databases is not supported.

Considering this, GaussDB provides the logical decoding function to generate logical logs by decoding Xlogs. The target database parses logical logs to replicate data in real time. For details, see Figure 1. Logical replication reduces the restrictions on target databases, allowing for data synchronization between heterogeneous databases and homogeneous databases with different forms. It allows data to be read and written during data synchronization on a target database, reducing the data synchronization latency.

Figure 1 Logical Replication

Logical replication consists of logical decoding and data replication. Logical decoding outputs logical logs by transaction. The database service or middleware parses the logical logs to implement data replication. Currently, GaussDB supports only logical decoding. Therefore, this section involves only logical decoding.