错误-
2019-06-17T05:00:11 [SOURCE_CAPTURE ]E: RetCode: SQL_ERROR SqlState: 58P01 NativeError: 1 Message: ERROR: could not access file "pglogical": No such file or directory;, Error while executing the query [1022502] (ar_odbc_stmt.c:2546)
2019-06-17T05:00:11 [SOURCE_CAPTURE ]E: RetCode: SQL_ERROR SqlState: 42P01 NativeError: 1 Message: ERROR: relation "pglogical.replication_set" does not exist;, No query has been executed with that handle [1022502] (ar_odbc_stmt.c:3722)
我们每3个月左右收到此错误。重新启动任务可以解决问题,但是恢复不起作用。
复制插槽已存在,但似乎处于非活动状态-
postgres=> select * from pg_replication_slots ;
slot_name | plugin | slot_type | datoid | database | active | active_pid | xmin | catalog_xmin | restart_lsn
----------------------------------------------------------------+---------------+-----------+--------+---------------+--------+------------+------+--------------+--------------
juvmrynv47ajpwrc_00016389_f28d6802_db75_43d6_8058_315783e9b1b2 | test_decoding | logical | 16389 | postgres | f | | | 148271120 | 8DF/B292FB48
(1 row)
答案 0 :(得分:2)
我面临着OP描述的相同错误。对我来说,我正在运行的环境是: -使用DMS版本3.1.4 -将目标和来源用作Postgresql Aurora 10.7
稍后检查在https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html上设置此文档的文档时,发现实际上对于Postgres版本> 10,我必须使用3.3.0及更高版本的DMS。
更改版本实际上可以使其正常工作,因此请确保在来到这里之前先检查一下亚马逊的文件:)
答案 1 :(得分:1)
在我们的情况下,活动事务导致此失败。因此,当DMS任务在失败后恢复或手动恢复时,它将尝试创建一个虚拟复制插槽,该插槽不需要源数据库上的活动事务,默认情况下,DMS将等待10分钟以使活动事务完成,然后Task将会失败,如下所示错误。
2019-09-02T06:48:10 [SOURCE_CAPTURE ]E: RetCode: SQL_ERROR SqlState: 57014 NativeError: 1 Message: ERROR: canceling statement due to statement timeout;
Error while executing the query [1022502] (ar_odbc_stmt.c:2581)
解决方案-
TransactionConsistencyTimeout
从600秒增加到1800秒。在任务设置中启用调试模式并获取有关失败的更多详细信息-
"LogComponents": [
{
"Id": "SOURCE_UNLOAD",
"Severity": "LOGGER_SEVERITY_DETAILED_DEBUG"
},
{
"Id": "SOURCE_CAPTURE",
"Severity": "LOGGER_SEVERITY_DETAILED_DEBUG"
},
{
"Id": "TARGET_LOAD",
"Severity": "LOGGER_SEVERITY_DETAILED_DEBUG"
},
{
"Id": "TARGET_APPLY",
"Severity": "LOGGER_SEVERITY_DETAILED_DEBUG"
},
{
"Id": "TASK_MANAGER",
"Severity": "LOGGER_SEVERITY_DETAILED_DEBUG"
}
]