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 DRDS 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 DRDS 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 an instance.
Precautions
- DTS uses read and write resources of the source and destination databases during initial full data synchronization. This may increase the database load. 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 synchronizing data, you must evaluate 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 usage of the source and destination databases is less than 30%.
- We recommend that you do not scale up or down the DRDS instance, migrate frequently-accessed tables, change shard keys, or perform DDL operations on objects during data synchronization. Otherwise, data synchronization may fail.
- If you need to change the network type of a DRDS instance during data synchronization, you must submit a ticket to modify the network connection information.
- After a data synchronization task is started, new tables that are created in the source database can be synchronized. However, you must add the tables to the required objects. 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
DRDS | AnalyticDB for PostgreSQL |
---|---|
Database | Schema |
Table | Table |