文档首页/
    
      
      数据复制服务 DRS/
      
      
        
        
        故障排除/
        
        
        失败案例/
        
        
        PostgreSQL->PostgreSQL实时同步/
        
      
      增量同步失败报错,关键词“PL/pgSQL function *** line *** at SQL statement”
    
  
  
    
        更新时间:2024-11-29 GMT+08:00
        
          
          
        
      
      
      
      
      
      
      
      
  
      
      
      
        
增量同步失败报错,关键词“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,未禁用目标库触发器。
   
    
 
    
     
   
  
 
 
    可登录至目标库RDS for PostgreSQL,执行如下SQL查看session_replication_role参数值:
show session_replication_role;
解决方案
- 在目标库RDS for PostgreSQL控制台修改session_replication_role参数为replica,并使其生效。
 - 重试DRS任务。