tencent cloud

Feedback

Syncing Online DDL Temp Table

Last updated: 2023-11-16 17:19:47

    Overview

    When performing an online DDL operation on tables in the source database with the gh-ost or pt-online-schema-change (pt-osc) tool, you need to sync the temp tables generated by online DDL changes to the target database. DTS allows you to associate the temp table names of the object table in advance when selecting the sync objects, so that the object table can be synced together with the temp tables subsequently generated by the source database.
    When you perform an online DDL operation on the table table name with the gh-ost tool, DTS supports syncing temp tables _table name_ghc, _table name_gho, and _table name_del to the target database.
    When you perform an online DDL operation on the table table name with the pt-osc tool, DTS supports syncing temp tables _table name_new and _table name_old to the target database.

    Application Scope

    Links supported for syncing online DDL temp tables are as follows:
    MySQL/MariaDB/Percona/TDSQL-C for MySQL > MySQL
    MySQL/MariaDB/Percona > MariaDB
    MySQL/MariaDB/TDSQL-C for MySQL > TDSQL-C for MySQL
    MySQL/MariaDB/Percona/TDSQL-C for MySQL > Kafka
    MySQL/MariaDB/Percona > TDSQL for TDStore

    Restriction

    The table mapping (table renaming) feature conflicts with the temp table migration feature (online DDL), and only one of them can be enabled at any time.

    Directions

    1. Log in to the DTS console, select Data Sync on the left sidebar, and create a sync task.
    2. In the Set sync options and objects step, enable Sync Online DDL Temp Table and select an option for Online DDL Tool.
    If you select gh-ost, DTS will migrate the temp tables (_table name_ghc, _table name_gho, and _table name_del) generated by the gh-ost tool to the target database.
    If you select pt-osc, DTS will migrate the temp tables (_table name_new and _table name_old) generated by the pt-osc tool to the target database.
    Note
    In Selected Object on the right, you need to select the specified table, and then the button Sync Online DDL Temp Table will be displayed below. If you select databases or ‍the "Tables" folder, the button won't be displayed.
    If the source database already contains tables with the same names as temp tables _table name_new and _table name_old, pt-osc will generate other temp tables with different names, which DTS cannot sync. In this case, if you just choose the table itself as the Sync Object, data in temp tables created by online DDL updates cannot be migrated to the target database. Instead, you must select the entire database or instance where the table to be synced resides.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support