Updated on 2024-04-11 GMT+08:00

Checking Replication Attribute of Primary Key Columns

PostgreSQL as the Source

Table 1 Replication attribute check of primary key columns

Check Item

Replication attribute check of primary key columns

Description

During a full+incremental synchronization or an incremental synchronization task, the replication attribute of primary key columns in the source database table is checked.

Item to Be Confirmed and Handling Suggestion

Item to be confirmed: All primary key columns of the tables to be synchronized are columns whose storage attribute is plain, and the replication attribute of the tables is neither full nor default. Incremental synchronization may fail.

Handling suggestion: Run the following SQL statement to change the replication attribute of the tables to default:

alter table schema.table replica identity default;

Item to be confirmed: The primary key columns of the tables to be synchronized contain columns whose storage attribute is not plain, and the replication attribute of the tables is neither full nor default. There is a high probability that incremental synchronization will fail.

Handling suggestion: Run the following SQL statement to change the replication attribute of the tables to full: (If the replication attribute is changed to default, incremental synchronization may still fail.)

alter table schema.table replica identity full;

Item to be confirmed: The primary key columns of the tables to be synchronized contain columns whose storage attribute is not plain, and the replication attribute of the tables is not full. Incremental synchronization may fail.

Handling suggestion: Run the following SQL statement to change the replication attribute of the tables to full:

alter table schema.table replica identity full;