Category | Description |
Supported versions | 1. Source database Self-built PostgreSQL databases: PostgreSQL 9.4, 9.5, 9.6, and 10–17. Third-party cloud vendors: 9.4, 9.5, 9.6, and 10–17. Alibaba Cloud ApsaraDB RDS for PostgreSQL. AWS RDS PostgreSQL Huawei Cloud RDS for PostgreSQL. TencentDB for PostgreSQL 9.4, 9.5, 9.6, and 10–17 (migration between databases under the same root account/migration between databases under different root accounts). 2. Target database TencentDB for PostgreSQL 9.4, 9.5, 9.6, and 10–17. |
Impact on the source database | 1. When Data Transfer Service (DTS) is used to perform a full data migration, it occupies certain resources of the source instance, which may cause the source instance load to increase and add pressure to the database. If your database configuration is low, it is recommended to perform the migration during off-peak hours. 2. During actual migration, the migration speed varies depending on factors such as the read performance of the source, network bandwidth between source and target instances, and specifications and performance of the target instance. Migration concurrency is determined by the number of cores in the target instance; for example, a 2-core target instance has a concurrency of 2. |
Migration objects | Correlated data objects need to be migrated simultaneously; otherwise, the migration will fail. Common relationships include: views referencing tables, views referencing views, stored procedures/functions/triggers referencing views or tables, and primary-foreign key associated tables. |
Advanced migration objects | By default, all advanced objects are migrated, including stored procedures, functions, and foreign keys. The migration of advanced objects is a one-time operation. Only the advanced objects that already exist in the source database before the task starts can be migrated. Stored procedures, functions, and foreign keys are migrated during the structural migration phase. |
Requirements for the source database | When the migration type Full + Incremental Migration is selected, tables in the source database must have a primary key; otherwise, data inconsistency between the source and target databases may occur. For tables without a primary key, it is recommended to select Full Migration. |
Requirements for the target database | If you want to migrate an entire instance, users and roles with the same names as those in the source database cannot exist in the target database. |
Network description | 1. When the migration task is configured, the address of the source database must use the IP address and port that can directly connect to the PostgreSQL instance, and cannot use proxy IP addresses and ports such as pgpool. 2. To ensure migration efficiency, cross-region migration is not supported for Cloud Virtual Machine (CVM) self-built instances. If cross-region migration is required, select the public network access method. |
Supported SQL statements | 1. DDL TABLE: CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE TABLE, and RENAME TABLE. VIEW: CREATE VIEW, ALTER VIEW, and DROP VIEW. INDEX: CREATE INDEX and DROP INDEX. TYPE: CREATE TYPE and DROP TYPE. SEQUENCE: CREATE SEQUENCE and DROP SEQUENCE. Note: DDL operations for FUNCTION, PROCEDURE, and TRIGGER objects are supported only during full database migration. |
Operation restrictions | 1. Do not modify or delete user information (including usernames, passwords, and permissions) and port numbers in the source and target databases during migration. 2. At the start of the migration task, the system automatically creates a schema prefixed with __tencentdb__ in the source database and a schema prefixed with __dst__resume__tencentdb__ in the target database. Objects under these schemas are used to support the internal operations of DTS. Do not manually delete them. Upon completion of the migration task, DTS automatically cleans up these temporary objects without manual intervention.3. After the migration task is completed, you can click Complete before proceeding with subsequent operations: Set GENERATED ALWAYS AS IDENTITY.Note: The table must contain auto-increment columns.
Update the last_value parameter of the corresponding sequence in the target database based on the last_value parameter of the sequence in the source database.Migrate object comments. Clean up the schema of the migration task created in the source and target databases. In the incremental migration scenario, the publications and replication slots created in the source database will be deleted. 4. Incremental DDL. Modifying the schema of an object is not supported. When a DROP statement is executed to delete multiple objects, all objects must belong to the same schema; otherwise, specify the schema for each object.Creating tables based on the table element clauses in the CREATE SCHEMA statement is not supported.5. Incremental DDL migration will not migrate DDL executed in PL/SQL (anonymous blocks, procedures, and functions). 6. Renaming tables is not supported. 7. Currently, creating tables through the EXECUTE FORMAT(CREATE TABLE) method in anonymous blocks is not supported.8. After structure initialization and before full export, CREATE TABLE operations are not supported; otherwise, an error message indicating that the table does not exist on the target will appear. 9. Since the postgres user of the TencentDB for PostgreSQL database is not available for customer use, after the objects created by the postgres user in the source database are synchronized to the target database, the owner of these objects will be changed to the migration account of the target database. |
Data migration instructions | When a data migration task is started in DTS, if incremental migration is selected, DTS will configure the replication property for the tables to be migrated by executing the ALTER TABLE XXX REPLICA IDENTITY FULL statement. This operation will trigger table locking. If there are long-running transactions on the table, it may cause prolonged locking of tables, thereby affecting the business of the source database. To minimize impact on the source database, it is recommended to avoid table-locking operations on the source database, start the task during off-peak hours, or manually execute the above SQL statement before starting the task.When a data migration task is started in DTS, if there are uncommitted long-running transactions in the database instance, the creation of the replication slot will time out, which will cause the task to fail. |
フィードバック