
# 增量同步失败报错，关键词"PL/pgSQL function \*\*\* line \*\*\* at SQL statement"
#### 场景描述
增量同步期间DRS任务报错，同步日志界面提示：service INCREMENT failed, cause by: insert %s failed:tid: %s, sqno: %s, ERROR: %s' PL/pgSQL function %s line %s at SQL statement
#### 可能原因
目标库session_replication_role没有设置为replica，未禁用目标库触发器。
![](https://support.huaweicloud.com/trouble-drs/public_sys-resources/note_3.0-zh-cn.png)
可登录至目标库RDS for PostgreSQL，执行如下SQL查看session_replication_role参数值：
```
show session_replication_role;
```
#### 解决方案
1. 在目标库RDS for PostgreSQL控制台修改session_replication_role参数为replica，并使其生效。
2. 重试DRS任务。
 
