Help Center/ Data Replication Service/ Troubleshooting/ Failure Cases/ Real-Time Synchronization from PostgreSQL to PostgreSQL/ Incremental Synchronization Error: Table %s not found in target database
Updated on 2022-09-21 GMT+08:00

Incremental Synchronization Error: Table %s not found in target database

Scenarios

During full synchronization, an error is reported, and the log information is as follows: service INCREMENT failed, cause by: Table %s not found in target database.

Possible Causes

  • The user did not select to synchronize DDL, so the CREATE TABLE statement is not synchronized to the destination database.
  • The user selected to synchronize DDL, but the source database uses the DDL statement that is not supported by DRS to create a table.
  • The table is deleted from the destination database.

Solution

  • Method 1: Create a task again and comply with the following DRS usage rules:
    • If you select to synchronize DDL, do not execute DDL statements that are not supported by DRS in the source database.
    • If you do not synchronize DDL, do not execute DDL statements in the source database, or execute DDL statements in the destination database before executing the same DDL statements in the source database.
    • During full and incremental synchronization, do not write data to the destination database. Otherwise, data may be inconsistent or the synchronization may fail.
  • Method 2: Perform the following operations to restore the DRS task:
    • Possible cause: The user did not select to synchronize DDL, so the CREATE TABLE statement in the source database is not synchronized to the destination database.

      Solution: Create a table in the destination database based on the table structure of the source database and retry the DRS task.

    • Possible cause: The user selected to synchronize DDL, but the source database uses the DDL statement that is not supported by DRS to create a table.

      Solution: Create a table in the destination database based on the table structure of the source database and retry the DRS task.

    • Possible cause: The table is deleted from the destination database.

      Solution: Re-create the table in the destination database based on the structure of the deleted table and retry the DRS task.

      If both the table and the data in the table are deleted, re-creating the table may lead to data inconsistency or cause the task to fail again.