Help Center/ Data Replication Service/ Troubleshooting/ Failure Cases/ Real-Time Synchronization from PostgreSQL to PostgreSQL/ Incremental Synchronization Error: PL/pgSQL function %s line %s at SQL statement
Updated on 2022-09-21 GMT+08:00

Incremental Synchronization Error: PL/pgSQL function %s line %s at SQL statement

Scenarios

During incremental synchronization, an error is reported, and the log information is as follows: service INCREMENT failed, cause by: insert %s failed:tid: %s, sqno: %s, ERROR: %s' PL/pgSQL function %s line %s at SQL statement.

Possible Causes

  • The destination database session_replication_role is not set to replica, and the destination database trigger is not disabled.

    You can log in to the destination database RDS PostgreSQL and run the following SQL statement to check the value of session_replication_role:

    show session_replication_role;

Solution

  1. On the RDS PostgreSQL console, change the value of session_replication_role to replica and apply the changes.
  2. Retry the DRS task.