AnalyticDB for PostgreSQL (previously known as HybridDB for PostgreSQL) is a fast, easy-to-use, and cost-effective warehousing service that can process petabytes of data. This topic describes how to synchronize data from a PolarDB-X 1.0 instance to an AnalyticDB for PostgreSQL instance by using Data Transmission Service (DTS). The data synchronization feature is applicable to scenarios such as ad hoc query and analysis, extract, transform, and load (ETL) operations, and data visualization.
Prerequisites
- A database is created in the source PolarDB-X 1.0 instance based on one or more ApsaraDB RDS for MySQL instances.
- The tables to be synchronized from the source database contain primary keys.
- An AnalyticDB for PostgreSQL instance is created. For more information, see Create a AnalyticDB for PostgreSQL instance.
Precautions
- DTS uses read and write resources of the source and destination databases during initial full data synchronization. This may increase the loads of the database servers. If the database performance is unfavorable, the specification is low, or the data volume is large, database services may become unavailable. For example, DTS occupies a large amount of read and write resources in the following cases: a large number of slow SQL queries are performed on the source database, the tables have no primary keys, or a deadlock occurs in the destination database. Before you synchronize data, evaluate the impact of data synchronization on the performance of the source and destination databases. We recommend that you synchronize data during off-peak hours. For example, you can synchronize data when the CPU utilization of the source and destination databases is less than 30%.
- When the data synchronization task is running, do not upgrade or downgrade the PolarDB-X 1.0 instance, migrate frequently-accessed tables, change shard keys, or perform DDL operations on source objects. Otherwise, the data synchronization task fails.
- If you switch the network type of the PolarDB-X 1.0 instance during data synchronization, you must submit a ticket to update the network connection settings of the data synchronization task.
- After a data synchronization task is started, new tables that are created in the source database can be synchronized. To do this, you must add the tables to the selected objects of the task. For more information see Add an object to a data synchronization task.
Limits
- You can select only tables as the objects to be synchronized.
- DTS does not synchronize the following types of data: JSON, GEOMETRY, CURVE, SURFACE, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, and GEOMETRYCOLLECTION.
SQL operations that can be synchronized
INSERT, UPDATE, and DELETE
Term mappings
PolarDB-X 1.0 | AnalyticDB for PostgreSQL |
---|---|
Database | Schema |
Table | Table |