Overview of synchronization scenarios for a PolarDB for MySQL source instance
Review the notes and limits for your synchronization scenario:
Note By default, DTS disables foreign key constraints when synchronizing data to a destination database. As a result, cascade and delete operations in the source database are not synchronized to the following destination database types:
Synchronization between PolarDB for MySQL clusters
The following notes and limits apply.
Type | Description |
Source database limits | The tables to be synchronized must have a primary key or a UNIQUE constraint, and all fields must be unique. Otherwise, duplicate data may appear in the destination database. If you synchronize data at the table level and need to edit tables (for example, mapping column names), a single synchronization task supports up to 1,000 tables. If you exceed this limit, an error is reported when you submit the task. To resolve this, split the tables into multiple synchronization tasks or synchronize the entire database. Binary logs: You must enable binary logging and set the loose_polar_log_bin parameter to ON. Otherwise, an error is reported during the precheck and the DTS instance fails to start. For more information about how to enable binary logging and modify parameters, see Enable binary logging and Set cluster parameters and node parameters.
Note Enabling binary logging for a PolarDB for MySQL cluster consumes storage space and incurs fees. Binary logs of the PolarDB for MySQL cluster must be retained for at least 3 days. We recommend retaining them for 7 days. Otherwise, the DTS task may fail because DTS cannot obtain the binary logs. In extreme cases, this may cause data inconsistency or data loss. Issues caused by a binary log retention period shorter than the required period are not covered by the DTS Service-Level Agreement (SLA).
Note For more information about how to set the retention period for binary logs of a PolarDB for MySQL cluster, see Modify the retention period.
Do not run DDL operations that change database or table schemas during schema synchronization or full synchronization. Otherwise, the synchronization task fails.
Note During full synchronization, DTS queries the source database. This creates metadata locks that may block DDL operations on the source database.
|
Other limits | You cannot synchronize data from a read-only node of the source PolarDB for MySQL cluster. You cannot synchronize OSS foreign tables from the source PolarDB for MySQL cluster. Synchronization of INDEX and PARTITION is not supported. Synchronization of VECTOR type data is not supported. Primary/secondary failover of the database instance is not supported during initial full data synchronization. If a failover occurs, reconfigure the synchronization task. If your source database uses online DDL operations in temporary table mode—including but not limited to multi-table merge scenarios—or adds function-based indexes to unique key columns, data loss or task failure may occur in the destination database. If a primary key or unique key conflict occurs while the task is running: If the table schemas are consistent and a record in the destination database has the same primary key or unique key value as a record in the source database: During full data synchronization, DTS retains the destination record and skips the source record. During incremental synchronization, DTS overwrites the destination record with the source record.
If the table schemas are inconsistent, data initialization may fail. This can result in only partial data synchronization or a complete synchronization failure. Use with caution.
Resolvers defined by comment syntax do not support synchronous use. Descending indexes are not supported during the schema synchronization phase. If your data includes four-byte characters—such as rare Chinese characters or emojis—the destination database and table must use the utf8mb4 charset.
Note If you use DTS to synchronize table schemas, set the character_set_server parameter at the instance level in the destination database to utf8mb4. Before you synchronize data, evaluate the performance of the source and destination databases. We recommend synchronizing data during off-peak hours. Otherwise, initial full data synchronization consumes read and write resources on both databases, which may increase the database load. Initial full data synchronization runs concurrent INSERT operations, which causes fragmentation in the destination database tables. As a result, the tablespace of the destination instance is larger than that of the source instance after initial full data synchronization. For table-level data synchronization, do not use tools such as pt-online-schema-change to perform online DDL operations on the synchronization objects in the source database. Otherwise, the synchronization fails. For table-level data synchronization, if no data other than the data from DTS is written to the destination database, you can use Data Management (DMS) to perform online DDL operations. For more information, see Change schemas without locking tables. During DTS synchronization, do not write data other than DTS data to the destination database. Otherwise, data inconsistency between the source and destination databases may occur. For example, if you use DMS to perform online DDL operations while other data is being written to the destination database, data may be lost. If a DDL operation fails to be written to the destination database, the DTS task continues to run. Check the task logs for the failed DDL operation. For more information about how to view task logs, see View task logs. To synchronize accounts from the source database, meet the prerequisites and review related considerations. For more information, see Migrate database accounts. If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.
Note Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.
|
Other notes | Two-way synchronization between PolarDB for MySQL clusters: DTS supports two-way synchronization between only two PolarDB for MySQL clusters. Two-way synchronization among more than two PolarDB for MySQL clusters is not supported. DDL syntax synchronization direction limit: to ensure the stability and data consistency of the two-way synchronization link, only forward DDL synchronization is supported. Reverse DDL synchronization is not supported. When a two-way synchronization task is running, DTS creates a database named DTS in the destination databases of the forward and reverse tasks to prevent data loop synchronization. Do not modify this database while the task is running, and ensure the database account used for the task has read and write permissions on this database. If a two-way synchronization instance in the China (Chengdu) or China (Shanghai) region includes a full data synchronization task, DTS creates a full data verification task for that instance by default. For this verification task, Full Data Verification is set to Verify based on the number of table rows. If you have already configured a full data verification task, your configuration takes precedence. A two-way synchronization task includes forward and reverse synchronization tasks. When you configure or reset the task, if the destination object of one task matches the synchronization object of the other task: Allow only one task to synchronize full and incremental data. The other task supports only incremental synchronization. Data from the source of the current task synchronizes only to the destination of the current task. It does not serve as source data for the other task.
DTS periodically runs the CREATE DATABASE IF NOT EXISTS `test` command on the source database to advance the binary log offset.
|
Synchronization from PolarDB for MySQL to ApsaraDB RDS for MySQL or self-managed MySQL
The following notes and limits apply.
Type | Description |
Source database limits | The tables to be synchronized must have a primary key or a UNIQUE constraint, and all fields must be unique. Otherwise, duplicate data may appear in the destination database. If you synchronize data at the table level and need to edit tables (for example, mapping column names), a single synchronization task supports up to 1,000 tables. If you exceed this limit, an error is reported when you submit the task. To resolve this, split the tables into multiple synchronization tasks or synchronize the entire database. Binary logs: You must enable binary logging and set the loose_polar_log_bin parameter to ON. Otherwise, an error is reported during the precheck and the DTS instance fails to start. For more information about how to enable binary logging and modify parameters, see Enable binary logging and Set cluster parameters and node parameters.
Note Enabling binary logging for a PolarDB for MySQL cluster consumes storage space and incurs fees. Binary logs of the PolarDB for MySQL cluster must be retained for at least 3 days. We recommend retaining them for 7 days. Otherwise, the DTS task may fail because DTS cannot obtain the binary logs. In extreme cases, this may cause data inconsistency or data loss. Issues caused by a binary log retention period shorter than the required period are not covered by the DTS Service-Level Agreement (SLA).
Note For more information about how to set the retention period for binary logs of a PolarDB for MySQL cluster, see Modify the retention period.
Do not run DDL operations that change database or table schemas during schema synchronization or full synchronization. Otherwise, the synchronization task fails.
Note During full synchronization, DTS queries the source database. This creates metadata locks that may block DDL operations on the source database.
|
Other limits | You cannot synchronize data from a read-only node of the source PolarDB for MySQL cluster. You cannot synchronize OSS foreign tables from the source PolarDB for MySQL cluster. Synchronization of INDEX and PARTITION is not supported. Synchronization of VECTOR type data is not supported. Primary/secondary failover of the database instance is not supported during initial full data synchronization. If a failover occurs, reconfigure the synchronization task. If your source database uses online DDL operations in temporary table mode—including but not limited to multi-table merge scenarios—or adds function-based indexes to unique key columns, data loss or task failure may occur in the destination database. Resolvers defined by comment syntax do not support synchronous use. Descending indexes are not supported during the schema synchronization phase. If a primary key or unique key conflict occurs while the task is running: If the table schemas are consistent and a record in the destination database has the same primary key or unique key value as a record in the source database: During full data synchronization, DTS retains the destination record and skips the source record. During incremental synchronization, DTS overwrites the destination record with the source record.
If the table schemas are inconsistent, data initialization may fail. This can result in only partial data synchronization or a complete synchronization failure. Use with caution.
If your data includes four-byte characters—such as rare Chinese characters or emojis—the destination database and table must use the utf8mb4 charset.
Note If you use DTS to synchronize table schemas, set the character_set_server parameter at the instance level in the destination database to utf8mb4. Before you synchronize data, evaluate the performance of the source and destination databases. We recommend synchronizing data during off-peak hours. Otherwise, initial full data synchronization consumes read and write resources on both databases, which may increase the database load. Initial full data synchronization runs concurrent INSERT operations, which causes fragmentation in the destination database tables. As a result, the tablespace of the destination instance is larger than that of the source instance after initial full data synchronization. For table-level data synchronization, do not use tools such as pt-online-schema-change to perform online DDL operations on the synchronization objects in the source database. Otherwise, the synchronization fails. For table-level data synchronization, if no data other than the data from DTS is written to the destination database, you can use Data Management (DMS) to perform online DDL operations. For more information, see Change schemas without locking tables. During DTS synchronization, do not write data other than DTS data to the destination database. Otherwise, data inconsistency between the source and destination databases may occur. For example, if you use DMS to perform online DDL operations while other data is being written to the destination database, data may be lost. If a DDL operation fails to be written to the destination database, the DTS task continues to run. Check the task logs for the failed DDL operation. For more information about how to view task logs, see View task logs. If you write columns with names that differ only in case to the same table in the destination MySQL database, unexpected results may occur because MySQL column names are case-insensitive. After data synchronization completes (the instance's Status is Completed), you should use the ANALYZE TABLE <table_name> command to confirm that all data is written to the target table. For example, after the HA failover mechanism is triggered in the target MySQL database, data might be written only to memory, which can cause data loss. A two-way synchronization task includes forward and reverse synchronization tasks. When you configure or reset the task, if the destination object of one task matches the synchronization object of the other task: Allow only one task to synchronize full and incremental data. The other task supports only incremental synchronization. Data from the source of the current task synchronizes only to the destination of the current task. It does not serve as source data for the other task.
If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.
Note Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.
|
Other notes | DTS periodically runs the CREATE DATABASE IF NOT EXISTS `test` command on the source database to advance the binary log offset. |
Synchronization from PolarDB for MySQL to PolarDB-X 1.0
The following notes and limits apply.
Type | Description |
Source database limits | The tables to be synchronized must have a primary key or a UNIQUE constraint, and all fields must be unique. Otherwise, duplicate data may appear in the destination database. If you synchronize data at the table level and need to edit tables (for example, mapping column names), a single synchronization task supports up to 1,000 tables. If you exceed this limit, an error is reported when you submit the task. To resolve this, split the tables into multiple synchronization tasks or synchronize the entire database. Binary logs: You must enable binary logging and set the loose_polar_log_bin parameter to ON. Otherwise, an error is reported during the precheck and the DTS instance fails to start. For more information about how to enable binary logging and modify parameters, see Enable binary logging and Set cluster parameters and node parameters.
Note Enabling binary logging for a PolarDB for MySQL cluster consumes storage space and incurs fees. Binary logs of the PolarDB for MySQL cluster must be retained for at least 3 days. We recommend retaining them for 7 days. Otherwise, the DTS task may fail because DTS cannot obtain the binary logs. In extreme cases, this may cause data inconsistency or data loss. Issues caused by a binary log retention period shorter than the required period are not covered by the DTS Service-Level Agreement (SLA).
Note For more information about how to set the retention period for binary logs of a PolarDB for MySQL cluster, see Modify the retention period.
During full data synchronization, do not perform DDL operations to change the schemas of databases or tables. Otherwise, the data synchronization task fails.
Note During the full synchronization phase, DTS queries the source database. This generates metadata locks, which may block the execution of DDL operations on the source database.
|
Other limits | Synchronization object requirements: Synchronization of data of the BIT, VARBIT, GEOMETRY, ARRAY, UUID, TSQUERY, TSVECTOR, VECTOR and TXID_SNAPSHOT types is not supported. Synchronization of prefix indexes is not supported. If the source database has prefix indexes, the data synchronization may fail. You cannot synchronize data from a read-only node of the source PolarDB for MySQL cluster. You cannot synchronize OSS foreign tables from the source PolarDB for MySQL cluster.
Primary/secondary failover of the database instance is not supported during initial full data synchronization. If a failover occurs, reconfigure the synchronization task. If your source database uses online DDL operations in temporary table mode—including but not limited to multi-table merge scenarios—or adds function-based indexes to unique key columns, data loss or task failure may occur in the destination database. Initial schema synchronization is not supported. Before you configure the synchronization task, create the corresponding databases and tables in the destination instance. If a primary key or unique key conflict occurs while the task is running: If the table schemas are consistent and a record in the destination database has the same primary key or unique key value as a record in the source database: During full data synchronization, DTS retains the destination record and skips the source record. During incremental synchronization, DTS overwrites the destination record with the source record.
If the table schemas are inconsistent, data initialization may fail. This can result in only partial data synchronization or a complete synchronization failure. Use with caution.
Before you synchronize data, evaluate the performance of the source and destination databases. We recommend synchronizing data during off-peak hours. Otherwise, initial full data synchronization consumes read and write resources on both databases, which may increase the database load. Initial full data synchronization runs concurrent INSERT operations, which causes fragmentation in the destination database tables. As a result, the tablespace of the destination instance is larger than that of the source instance after initial full data synchronization. For table-level data synchronization, do not use tools such as pt-online-schema-change to perform online DDL operations on the synchronization objects in the source database. Otherwise, the synchronization fails. For table-level data synchronization, if no data other than the data from DTS is written to the destination database, you can use Data Management (DMS) to perform online DDL operations. For more information, see Change schemas without locking tables. During DTS synchronization, do not write data other than DTS data to the destination database. Otherwise, data inconsistency between the source and destination databases may occur. For example, if you use DMS to perform online DDL operations while other data is being written to the destination database, data may be lost. If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.
Note Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters. -
If the destination PolarDB-X 1.0 table has auto partitioning enabled (auto_partition=true), each DDL statement executed on the source can contain only one alter_specification. Otherwise, DTS reports an error (TDDL-4998: Multi alter specifications when create GSI not support yet). To execute a DDL statement that contains multiple alter_specification items, split each alter_specification into a separate DDL statement and execute them one by one. For more information, see ALTER TABLE.
|
Other notes | DTS periodically runs the CREATE DATABASE IF NOT EXISTS `test` command on the source database to advance the binary log offset. |
Synchronization from PolarDB for MySQL to AnalyticDB for MySQL 2.0
The following notes and limits apply.
Type | Description |
Source database limits | The tables to be synchronized must have a primary key or a UNIQUE constraint, and all fields must be unique. Otherwise, duplicate data may appear in the destination database. If you synchronize data at the table level and need to edit tables (for example, mapping column names), a single synchronization task supports up to 1,000 tables. If you exceed this limit, an error is reported when you submit the task. To resolve this, split the tables into multiple synchronization tasks or synchronize the entire database. Binary logs: You must enable binary logging and set the loose_polar_log_bin parameter to ON. Otherwise, an error is reported during the precheck and the DTS instance fails to start. For more information about how to enable binary logging and modify parameters, see Enable binary logging and Set cluster parameters and node parameters.
Note Enabling binary logging for a PolarDB for MySQL cluster consumes storage space and incurs fees. Binary logs of the PolarDB for MySQL cluster must be retained for at least 3 days. We recommend retaining them for 7 days. Otherwise, the DTS task may fail because DTS cannot obtain the binary logs. In extreme cases, this may cause data inconsistency or data loss. Issues caused by a binary log retention period shorter than the required period are not covered by the DTS Service-Level Agreement (SLA).
Note For more information about how to set the retention period for binary logs of a PolarDB for MySQL cluster, see Modify the retention period.
During synchronization, do not perform DDL operations to modify primary keys or add comments to tables, such as ALTER TABLE table_name COMMENT='Table comment';. Otherwise, the DDL operations fail to be executed during data synchronization. Do not run DDL operations that change database or table schemas during schema synchronization or full synchronization. Otherwise, the synchronization task fails.
Note During full synchronization, DTS queries the source database. This creates metadata locks that may block DDL operations on the source database.
|
Other limits | Synchronization of prefix indexes is not supported. If the source database has prefix indexes, the data synchronization may fail. Primary/secondary failover of the database instance is not supported during initial full data synchronization. If a failover occurs, reconfigure the synchronization task. If your source database uses online DDL operations in temporary table mode—including but not limited to multi-table merge scenarios—or adds function-based indexes to unique key columns, data loss or task failure may occur in the destination database. If a primary key or unique key conflict occurs while the task is running: If the table schemas are consistent and a record in the destination database has the same primary key or unique key value as a record in the source database: During full data synchronization, DTS retains the destination record and skips the source record. During incremental synchronization, DTS overwrites the destination record with the source record.
If the table schemas are inconsistent, data initialization may fail. This can result in only partial data synchronization or a complete synchronization failure. Use with caution.
The destination database must contain a custom primary key. Or, in the Configurations for Databases, Tables, and Columns step, configure a Primary Key Column. Otherwise, synchronization may fail. You cannot synchronize data from a read-only node of the source PolarDB for MySQL cluster. You cannot synchronize OSS foreign tables from the source PolarDB for MySQL cluster. Synchronization of VECTOR type data is not supported. If the destination is an AnalyticDB for MySQL (2.0) cluster, the objects to be synchronized from the source instance cannot contain the Reserved words (Version 2.0) of AnalyticDB for MySQL (2.0). Otherwise, the data synchronization or DDL operation synchronization fails. Before you synchronize data, evaluate the performance of the source and destination databases. We recommend synchronizing data during off-peak hours. Otherwise, initial full data synchronization consumes read and write resources on both databases, which may increase the database load. Initial full data synchronization runs concurrent INSERT operations, which causes fragmentation in the destination database tables. As a result, the tablespace of the destination instance is larger than that of the source instance after initial full data synchronization. For table-level data synchronization, do not use tools such as pt-online-schema-change to perform online DDL operations on the synchronization objects in the source database. Otherwise, the synchronization fails. For table-level data synchronization, if no data other than the data from DTS is written to the destination database, you can use Data Management (DMS) to perform online DDL operations. For more information, see Change schemas without locking tables. During DTS synchronization, do not write data other than DTS data to the destination database. Otherwise, data inconsistency between the source and destination databases may occur. For example, if you use DMS to perform online DDL operations while other data is being written to the destination database, data may be lost. If a DDL operation fails to be written to the destination database, the DTS task continues to run. Check the task logs for the failed DDL operation. For more information about how to view task logs, see View task logs. If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.
Note Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.
|
Other notes | DTS periodically runs the CREATE DATABASE IF NOT EXISTS `test` command on the source database to advance the binary log offset. |
Synchronization from PolarDB for MySQL to AnalyticDB for MySQL 3.0
The following notes and limits apply.
Type | Description |
Source database limits | The tables to be synchronized must have a primary key or a UNIQUE constraint, and all fields must be unique. Otherwise, duplicate data may appear in the destination database. If you synchronize data at the table level and need to edit tables (for example, mapping column names), a single synchronization task supports up to 1,000 tables. If you exceed this limit, an error is reported when you submit the task. To resolve this, split the tables into multiple synchronization tasks or synchronize the entire database. Binary logs: You must enable binary logging and set the loose_polar_log_bin parameter to ON. Otherwise, an error is reported during the precheck and the DTS instance fails to start. For more information about how to enable binary logging and modify parameters, see Enable binary logging and Set cluster parameters and node parameters.
Note Enabling binary logging for a PolarDB for MySQL cluster consumes storage space and incurs fees. Binary logs of the PolarDB for MySQL cluster must be retained for at least 3 days. We recommend retaining them for 7 days. Otherwise, the DTS task may fail because DTS cannot obtain the binary logs. In extreme cases, this may cause data inconsistency or data loss. Issues caused by a binary log retention period shorter than the required period are not covered by the DTS Service-Level Agreement (SLA).
Note For more information about how to set the retention period for binary logs of a PolarDB for MySQL cluster, see Modify the retention period.
During synchronization, do not perform DDL operations to modify primary keys or add comments to tables, such as ALTER TABLE table_name COMMENT='Table comment';. Otherwise, the DDL operations fail to be executed during data synchronization. Do not run DDL operations that change database or table schemas during schema synchronization or full synchronization. Otherwise, the synchronization task fails.
Note During full synchronization, DTS queries the source database. This creates metadata locks that may block DDL operations on the source database.
|
Other limits | Synchronization of prefix indexes is not supported. If the source database has prefix indexes, the data synchronization may fail. Primary/secondary failover of the database instance is not supported during initial full data synchronization. If a failover occurs, reconfigure the synchronization task. If your source database uses online DDL operations in temporary table mode—including but not limited to multi-table merge scenarios—or adds function-based indexes to unique key columns, data loss or task failure may occur in the destination database. If a primary key or unique key conflict occurs while the task is running: If the table schemas are consistent and a record in the destination database has the same primary key or unique key value as a record in the source database: During full data synchronization, DTS retains the destination record and skips the source record. During incremental synchronization, DTS overwrites the destination record with the source record.
If the table schemas are inconsistent, data initialization may fail. This can result in only partial data synchronization or a complete synchronization failure. Use with caution.
The destination database must contain a custom primary key. Or, in the Configurations for Databases, Tables, and Columns step, configure a Primary Key Column. Otherwise, synchronization may fail. You cannot synchronize data from a read-only node of the source PolarDB for MySQL cluster. Synchronization of INDEX, PARTITION, VIEW, PROCEDURE, FUNCTION, TRIGGER, and FK is not supported. Synchronization of VECTOR type data is not supported. You cannot synchronize OSS foreign tables from the source PolarDB for MySQL cluster. Due to the limits of AnalyticDB for MySQL (3.0), if the disk space usage of a node in the AnalyticDB for MySQL (3.0) cluster exceeds 80%, the DTS task becomes abnormal and latency occurs. Estimate the required space based on the objects to be synchronized to ensure the destination cluster has sufficient storage space. If the destination AnalyticDB for MySQL 3.0 cluster is backing up while the DTS task runs, the task fails. Before you synchronize data, evaluate the performance of the source and destination databases. We recommend synchronizing data during off-peak hours. Otherwise, initial full data synchronization consumes read and write resources on both databases, which may increase the database load. Initial full data synchronization runs concurrent INSERT operations, which causes fragmentation in the destination database tables. As a result, the tablespace of the destination instance is larger than that of the source instance after initial full data synchronization. For table-level data synchronization, do not use tools such as pt-online-schema-change to perform online DDL operations on the synchronization objects in the source database. Otherwise, the synchronization fails. For table-level data synchronization, if no data other than the data from DTS is written to the destination database, you can use Data Management (DMS) to perform online DDL operations. For more information, see Change schemas without locking tables. During DTS synchronization, do not write data other than DTS data to the destination database. Otherwise, data inconsistency between the source and destination databases may occur. For example, if you use DMS to perform online DDL operations while other data is being written to the destination database, data may be lost. If a DDL operation fails to be written to the destination database, the DTS task continues to run. Check the task logs for the failed DDL operation. For more information about how to view task logs, see View task logs. If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.
Note Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.
|
Other notes | DTS periodically runs the CREATE DATABASE IF NOT EXISTS `test` command on the source database to advance the binary log offset. |
Synchronization from PolarDB for MySQL to AnalyticDB for PostgreSQL
The following notes and limits apply.
Type | Description |
Source database limits | The tables to be synchronized must have a primary key or a UNIQUE constraint, and all fields must be unique. Otherwise, duplicate data may appear in the destination database. If you synchronize data at the table level and need to edit tables (for example, mapping column names), a single synchronization task supports up to 1,000 tables. If you exceed this limit, an error is reported when you submit the task. To resolve this, split the tables into multiple synchronization tasks or synchronize the entire database. Binary logs: You must enable binary logging and set the loose_polar_log_bin parameter to ON. Otherwise, an error is reported during the precheck and the DTS instance fails to start. For more information about how to enable binary logging and modify parameters, see Enable binary logging and Set cluster parameters and node parameters.
Note Enabling binary logging for a PolarDB for MySQL cluster consumes storage space and incurs fees. Binary logs of the PolarDB for MySQL cluster must be retained for at least 3 days. We recommend retaining them for 7 days. Otherwise, the DTS task may fail because DTS cannot obtain the binary logs. In extreme cases, this may cause data inconsistency or data loss. Issues caused by a binary log retention period shorter than the required period are not covered by the DTS Service-Level Agreement (SLA).
Note For more information about how to set the retention period for binary logs of a PolarDB for MySQL cluster, see Modify the retention period.
During synchronization, do not perform DDL operations to modify primary keys or add comments to tables, such as ALTER TABLE table_name COMMENT='Table comment';. Otherwise, the DDL operations fail to be executed during data synchronization. If the data to be synchronized in the source database contains date data of 0000-00-00 00:00:00, the task may fail.
Note DTS converts this date data to null when synchronizing it to the destination database. You can temporarily change the source data to 0001-01-01 00:00:00, or set the corresponding field in the destination database to allow null values. Do not run DDL operations that change database or table schemas during schema synchronization or full synchronization. Otherwise, the synchronization task fails.
Note During full synchronization, DTS queries the source database. This creates metadata locks that may block DDL operations on the source database.
|
Other limits | Synchronization object requirements: Only table-level synchronization is supported. Synchronization of data of the BIT, VARBIT, GEOMETRY, ARRAY, UUID, TSQUERY, TSVECTOR, VECTOR and TXID_SNAPSHOT types is not supported. Synchronization of prefix indexes is not supported. If the source database has prefix indexes, the data synchronization may fail. You cannot synchronize data from a read-only node of the source PolarDB for MySQL cluster. You cannot synchronize OSS foreign tables from the source PolarDB for MySQL cluster. Synchronization of PARTITION, VIEW, PROCEDURE, FUNCTION, TRIGGER, FK, and INDEX is not supported.
Primary/secondary failover of the database instance is not supported during initial full data synchronization. If a failover occurs, reconfigure the synchronization task. If your source database uses online DDL operations in temporary table mode—including but not limited to multi-table merge scenarios—or adds function-based indexes to unique key columns, data loss or task failure may occur in the destination database. If a primary key or unique key conflict occurs while the task is running: If the table schemas are consistent and a record in the destination database has the same primary key or unique key value as a record in the source database: During full data synchronization, DTS retains the destination record and skips the source record. During incremental synchronization, DTS overwrites the destination record with the source record.
If the table schemas are inconsistent, data initialization may fail. This can result in only partial data synchronization or a complete synchronization failure. Use with caution.
If the table to synchronize has a primary key, the primary key column in the destination table must match the source table. If the table to synchronize lacks a primary key, the primary key column in the destination table must match the distribution key. The unique key in the destination table—including the primary key column—must include all columns in the distribution key. Before you synchronize data, evaluate the performance of the source and destination databases. We recommend synchronizing data during off-peak hours. Otherwise, initial full data synchronization consumes read and write resources on both databases, which may increase the database load. Initial full data synchronization runs concurrent INSERT operations, which causes fragmentation in the destination database tables. As a result, the tablespace of the destination instance is larger than that of the source instance after initial full data synchronization. For table-level data synchronization, do not use tools such as pt-online-schema-change to perform online DDL operations on the synchronization objects in the source database. Otherwise, the synchronization fails. For table-level data synchronization, if no data other than the data from DTS is written to the destination database, you can use Data Management (DMS) to perform online DDL operations. For more information, see Change schemas without locking tables. During DTS synchronization, do not write data other than DTS data to the destination database. Otherwise, data inconsistency between the source and destination databases may occur. For example, if you use DMS to perform online DDL operations while other data is being written to the destination database, data may be lost. AO tables are not supported as destination tables. If you use column mapping for non-full table synchronization or if the source and destination table schemas differ, data in the columns that are missing in the destination table will be lost. If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.
Note Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.
|
Other notes | DTS periodically runs the CREATE DATABASE IF NOT EXISTS `test` command on the source database to advance the binary log offset. |
Synchronization from PolarDB for MySQL to Alibaba Cloud DataHub
The following notes and limits apply.
Type | Description |
Source database limits | The tables to be synchronized must have a primary key or a UNIQUE constraint, and all fields must be unique. Otherwise, duplicate data may appear in the destination database. If you synchronize data at the table level and need to edit tables (for example, mapping column names), a single synchronization task supports up to 1,000 tables. If you exceed this limit, an error is reported when you submit the task. To resolve this, split the tables into multiple synchronization tasks or synchronize the entire database. Binary logs: You must enable binary logging and set the loose_polar_log_bin parameter to ON. Otherwise, an error is reported during the precheck and the DTS instance fails to start. For more information about how to enable binary logging and modify parameters, see Enable binary logging and Set cluster parameters and node parameters.
Note Enabling binary logging for a PolarDB for MySQL cluster consumes storage space and incurs fees. Binary logs of the PolarDB for MySQL cluster must be retained for at least 3 days. We recommend retaining them for 7 days. Otherwise, the DTS task may fail because DTS cannot obtain the binary logs. In extreme cases, this may cause data inconsistency or data loss. Issues caused by a binary log retention period shorter than the required period are not covered by the DTS Service-Level Agreement (SLA).
Note For more information about how to set the retention period for binary logs of a PolarDB for MySQL cluster, see Modify the retention period.
Do not run DDL operations that change database or table schemas during schema synchronization or full synchronization. Otherwise, the synchronization task fails.
Note During full synchronization, DTS queries the source database. This creates metadata locks that may block DDL operations on the source database.
|
Other limits | The maximum length of a single String field in the destination DataHub topic is 2 MB. Database-level and table-level data synchronization are supported. You cannot synchronize data from a read-only node of the source PolarDB for MySQL cluster. You cannot synchronize OSS foreign tables from the source PolarDB for MySQL cluster. Synchronization of VECTOR type data is not supported. Primary/secondary failover of the database instance is not supported during initial full data synchronization. If a failover occurs, reconfigure the synchronization task. For table-level data synchronization, do not use tools such as pt-online-schema-change to perform online DDL operations on the synchronization objects in the source database. Otherwise, the synchronization fails. For table-level data synchronization, if no data other than the data from DTS is written to the destination database, you can use Data Management (DMS) to perform online DDL operations. For more information, see Change schemas without locking tables. During DTS synchronization, do not write data other than DTS data to the destination database. Otherwise, data inconsistency between the source and destination databases may occur. For example, if you use DMS to perform online DDL operations while other data is being written to the destination database, data may be lost. If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.
Note Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.
|
Other notes | DTS periodically runs the CREATE DATABASE IF NOT EXISTS `test` command on the source database to advance the binary log offset. |
Synchronization from PolarDB for MySQL to Elasticsearch
The following notes and limits apply.
Type | Description |
Source database limits | The tables to be synchronized must have a primary key or a UNIQUE constraint, and all fields must be unique. Otherwise, duplicate data may appear in the destination database. If you synchronize data at the table level and need to edit tables (for example, mapping column names), a single synchronization task supports up to 1,000 tables. If you exceed this limit, an error is reported when you submit the task. To resolve this, split the tables into multiple synchronization tasks or synchronize the entire database. Binary logs: You must enable binary logging and set the loose_polar_log_bin parameter to ON. Otherwise, an error is reported during the precheck and the DTS instance fails to start. For more information about how to enable binary logging and modify parameters, see Enable binary logging and Set cluster parameters and node parameters.
Note Enabling binary logging for a PolarDB for MySQL cluster consumes storage space and incurs fees. Binary logs of the PolarDB for MySQL cluster must be retained for at least 3 days. We recommend retaining them for 7 days. Otherwise, the DTS task may fail because DTS cannot obtain the binary logs. In extreme cases, this may cause data inconsistency or data loss. Issues caused by a binary log retention period shorter than the required period are not covered by the DTS Service-Level Agreement (SLA).
Note For more information about how to set the retention period for binary logs of a PolarDB for MySQL cluster, see Modify the retention period.
Do not run DDL operations that change database or table schemas during schema synchronization or full synchronization. Otherwise, the synchronization task fails.
Note During full synchronization, DTS queries the source database. This creates metadata locks that may block DDL operations on the source database.
|
Other limits | You cannot synchronize data from a read-only node of the source PolarDB for MySQL cluster. You cannot synchronize OSS foreign tables from the source PolarDB for MySQL cluster. DTS does not support synchronizing INDEX, PARTITION, VIEW, PROCEDURE, FUNCTION, TRIGGER, or FK objects. Synchronization of VECTOR type data is not supported. DDL operations are not supported during incremental data synchronization. DDL operations that are performed on the source database, such as adding a column, are filtered out by DTS and are not applied to the destination instance. If data changes that involve the newly added column subsequently occur in the source table, DTS reports an error because the corresponding field cannot be found in the destination instance. You cannot synchronize data to Elasticsearch indexes that contain parent-child relationships or Join field types. Doing so may cause task errors or query failures in the destination. Primary/secondary failover of the database instance is not supported during initial full data synchronization. If a failover occurs, reconfigure the synchronization task. To add columns to tables in the source database, first modify the corresponding mapping in the Elasticsearch instance. Then execute the DDL operation in the source database. Finally, pause and restart the synchronization task. Because PolarDB for MySQL and Elasticsearch support different data types, one-to-one type mapping is not possible. During schema initialization, DTS maps types based on the data types supported by the destination database. For details, see Data type mapping for schema initialization. Before you synchronize data, evaluate the performance of the source and destination databases. We recommend synchronizing data during off-peak hours. Otherwise, initial full data synchronization consumes read and write resources on both databases, which may increase the database load. Initial full data synchronization runs concurrent INSERT operations, which causes fragmentation in the destination database tables. As a result, the tablespace of the destination instance is larger than that of the source instance after initial full data synchronization. For table-level data synchronization, do not use tools such as pt-online-schema-change to perform online DDL operations on the synchronization objects in the source database. Otherwise, the synchronization fails. For table-level data synchronization, if no data other than the data from DTS is written to the destination database, you can use Data Management (DMS) to perform online DDL operations. For more information, see Change schemas without locking tables. If data other than DTS writes to the destination database during synchronization, data inconsistency between source and destination databases may occur. Development and test specifications of Elasticsearch instances are not supported. If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.
Note Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.
|
Other notes | DTS periodically executes the CREATE DATABASE IF NOT EXISTS `test` command on the source database to advance the binary log offset. |
Synchronization from PolarDB for MySQL to Alibaba Cloud Message Queue for Apache Kafka or self-managed Kafka
The following notes and limits apply.
Type | Description |
Source database limits | The tables to be synchronized must have a primary key or a UNIQUE constraint, and all fields must be unique. Otherwise, duplicate data may appear in the destination database. If you synchronize data at the table level and need to edit tables (for example, mapping column names), a single synchronization task supports up to 1,000 tables. If you exceed this limit, an error is reported when you submit the task. To resolve this, split the tables into multiple synchronization tasks or synchronize the entire database. Binary logs: You must enable binary logging and set the loose_polar_log_bin parameter to ON. Otherwise, an error is reported during the precheck and the DTS instance fails to start. For more information about how to enable binary logging and modify parameters, see Enable binary logging and Set cluster parameters and node parameters.
Note Enabling binary logging for a PolarDB for MySQL cluster consumes storage space and incurs fees. Binary logs of the PolarDB for MySQL cluster must be retained for at least 3 days. We recommend retaining them for 7 days. Otherwise, the DTS task may fail because DTS cannot obtain the binary logs. In extreme cases, this may cause data inconsistency or data loss. Issues caused by a binary log retention period shorter than the required period are not covered by the DTS Service-Level Agreement (SLA).
Note For more information about how to set the retention period for binary logs of a PolarDB for MySQL cluster, see Modify the retention period.
Do not run DDL operations that change database or table schemas during schema synchronization or full synchronization. Otherwise, the synchronization task fails.
Note During full synchronization, DTS queries the source database. This creates metadata locks that may block DDL operations on the source database.
|
Other limits | You cannot synchronize data from a read-only node of the source PolarDB for MySQL cluster. You cannot synchronize OSS foreign tables from the source PolarDB for MySQL cluster. Synchronization of INDEX, PARTITION, VIEW, PROCEDURE, FUNCTION, TRIGGER, and FK is not supported. Synchronization of VECTOR type data is not supported. Primary/secondary failover of the database instance is not supported during initial full data synchronization. If a failover occurs, reconfigure the synchronization task. Before you synchronize data, evaluate the performance of the source and destination databases. We recommend synchronizing data during off-peak hours. Otherwise, initial full data synchronization consumes read and write resources on both databases, which may increase the database load. Initial full data synchronization runs concurrent INSERT operations, which causes fragmentation in the destination database tables. As a result, the tablespace of the destination instance is larger than that of the source instance after initial full data synchronization. For table-level data synchronization, do not use tools such as pt-online-schema-change to perform online DDL operations on the synchronization objects in the source database. Otherwise, the synchronization fails. For table-level data synchronization, if no data other than the data from DTS is written to the destination database, you can use Data Management (DMS) to perform online DDL operations. For more information, see Change schemas without locking tables. During DTS synchronization, do not write data other than DTS data to the destination database. Otherwise, data inconsistency between the source and destination databases may occur. For example, if you use DMS to perform online DDL operations while other data is being written to the destination database, data may be lost. During synchronization, if the destination Kafka cluster is scaled in or out, you must restart the instance. If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.
Note Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.
|
Other notes | DTS periodically runs the CREATE DATABASE IF NOT EXISTS `test` command on the source database to advance the binary log offset. |
Synchronization from PolarDB for MySQL to MaxCompute
The following notes and limits apply.
Type | Description |
Source database limits | The tables to be synchronized must have a primary key or a UNIQUE constraint, and all fields must be unique. Otherwise, duplicate data may appear in the destination database. If you synchronize data at the table level and need to edit tables (for example, mapping column names), a single synchronization task supports up to 1,000 tables. If you exceed this limit, an error is reported when you submit the task. To resolve this, split the tables into multiple synchronization tasks or synchronize the entire database. Binary logs: You must enable binary logging and set the loose_polar_log_bin parameter to ON. Otherwise, an error is reported during the precheck and the DTS instance fails to start. For more information about how to enable binary logging and modify parameters, see Enable binary logging and Set cluster parameters and node parameters.
Note Enabling binary logging for a PolarDB for MySQL cluster consumes storage space and incurs fees. Binary logs of the PolarDB for MySQL cluster must be retained for at least 3 days. We recommend retaining them for 7 days. Otherwise, the DTS task may fail because DTS cannot obtain the binary logs. In extreme cases, this may cause data inconsistency or data loss. Issues caused by a binary log retention period shorter than the required period are not covered by the DTS Service-Level Agreement (SLA).
Note For more information about how to set the retention period for binary logs of a PolarDB for MySQL cluster, see Modify the retention period.
Do not run DDL operations that change database or table schemas during schema synchronization or full synchronization. Otherwise, the synchronization task fails.
Note During full synchronization, DTS queries the source database. This creates metadata locks that may block DDL operations on the source database.
|
Other limits | You cannot synchronize data from a read-only node of the source PolarDB for MySQL cluster. You cannot synchronize OSS foreign tables from the source PolarDB for MySQL cluster. Synchronization of INDEX, PARTITION, VIEW, PROCEDURE, FUNCTION, TRIGGER, and FK is not supported. Synchronization of VECTOR type data is not supported. Primary/secondary failover of the database instance is not supported during initial full data synchronization. If a failover occurs, reconfigure the synchronization task. Before you synchronize data, evaluate the performance of the source and destination databases. We recommend synchronizing data during off-peak hours. Otherwise, initial full data synchronization consumes read and write resources on both databases, which may increase the database load. Initial full data synchronization runs concurrent INSERT operations, which causes fragmentation in the destination database tables. As a result, the tablespace of the destination instance is larger than that of the source instance after initial full data synchronization. For table-level data synchronization, do not use tools such as pt-online-schema-change to perform online DDL operations on the synchronization objects in the source database. Otherwise, the synchronization fails. For table-level data synchronization, if no data other than the data from DTS is written to the destination database, you can use Data Management (DMS) to perform online DDL operations. For more information, see Change schemas without locking tables. During DTS synchronization, do not write data other than DTS data to the destination database. Otherwise, data inconsistency between the source and destination databases may occur. For example, if you use DMS to perform online DDL operations while other data is being written to the destination database, data may be lost. Because MaxCompute does not support primary key constraints, duplicate records may appear in MaxCompute if DTS retransmits data due to network issues or other reasons. If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.
Note Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.
|
Other notes | DTS periodically runs the CREATE DATABASE IF NOT EXISTS `test` command on the source database to advance the binary log offset. |
Synchronization from PolarDB for MySQL to self-managed Oracle
The following notes and limits apply.
Type | Description |
Source database limits | The tables to be synchronized must have a primary key or a UNIQUE constraint, and all fields must be unique. Otherwise, duplicate data may appear in the destination database. If you synchronize data at the table level and need to edit tables (for example, mapping column names), a single synchronization task supports up to 1,000 tables. If you exceed this limit, an error is reported when you submit the task. To resolve this, split the tables into multiple synchronization tasks or synchronize the entire database. Binary logs: You must enable binary logging and set the loose_polar_log_bin parameter to ON. Otherwise, an error is reported during the precheck and the DTS instance fails to start. For more information about how to enable binary logging and modify parameters, see Enable binary logging and Set cluster parameters and node parameters.
Note Enabling binary logging for a PolarDB for MySQL cluster consumes storage space and incurs fees. Binary logs of the PolarDB for MySQL cluster must be retained for at least 3 days. We recommend retaining them for 7 days. Otherwise, the DTS task may fail because DTS cannot obtain the binary logs. In extreme cases, this may cause data inconsistency or data loss. Issues caused by a binary log retention period shorter than the required period are not covered by the DTS Service-Level Agreement (SLA).
Note For more information about how to set the retention period for binary logs of a PolarDB for MySQL cluster, see Modify the retention period.
Do not run DDL operations that change database or table schemas during schema synchronization or full synchronization. Otherwise, the synchronization task fails.
Note During full synchronization, DTS queries the source database. This creates metadata locks that may block DDL operations on the source database.
|
Other limits | You cannot synchronize data from a read-only node of the source PolarDB for MySQL cluster. You cannot synchronize OSS foreign tables from the source PolarDB for MySQL cluster. Synchronization of VECTOR type data is not supported. Primary/secondary failover of the database instance is not supported during initial full data synchronization. If a failover occurs, reconfigure the synchronization task. If your source database uses online DDL operations in temporary table mode—including but not limited to multi-table merge scenarios—or adds function-based indexes to unique key columns, data loss or task failure may occur in the destination database. If a primary key or unique key conflict occurs while the task is running: If the table schemas are consistent and a record in the destination database has the same primary key or unique key value as a record in the source database: During full data synchronization, DTS retains the destination record and skips the source record. During incremental synchronization, DTS overwrites the destination record with the source record.
If the table schemas are inconsistent, data initialization may fail. This can result in only partial data synchronization or a complete synchronization failure. Use with caution.
While the DTS instance is running, disable triggers and foreign keys in the destination database. Otherwise, the DTS instance fails. Before you synchronize data, evaluate the performance of the source and destination databases. We recommend synchronizing data during off-peak hours. Otherwise, initial full data synchronization consumes read and write resources on both databases, which may increase the database load. Initial full data synchronization runs concurrent INSERT operations, which causes fragmentation in the destination database tables. As a result, the tablespace of the destination instance is larger than that of the source instance after initial full data synchronization. For table-level data synchronization, do not use tools such as pt-online-schema-change to perform online DDL operations on the synchronization objects in the source database. Otherwise, the synchronization fails. For table-level data synchronization, if no data other than the data from DTS is written to the destination database, you can use Data Management (DMS) to perform online DDL operations. For more information, see Change schemas without locking tables. During DTS synchronization, do not write data other than DTS data to the destination database. Otherwise, data inconsistency between the source and destination databases may occur. For example, if you use DMS to perform online DDL operations while other data is being written to the destination database, data may be lost. If the self-managed Oracle database uses a Real Application Clusters (RAC) architecture, you cannot configure a Single Client Access Name (SCAN) IP address. You can only configure one of the virtual IP addresses (VIPs) in the connection information. With this configuration, node switching in the RAC is not supported. If a task fails, DTS support staff will attempt to restore it within eight hours. During restoration, they may restart the task or adjust its parameters.
Note Only DTS task parameters are modified—not database parameters. Parameters that may be adjusted include those listed in Modify instance parameters.
|
Other notes | DTS periodically runs the CREATE DATABASE IF NOT EXISTS `test` command on the source database to advance the binary log offset. |