当Postgres的DateStyle参数不是ISO格式时,DMS任务会失败。

0

【以下的问题经过翻译处理】 大家好。

我需要在Amazon EC2实例上使用DMS从Postgres 11.14数据库中复制一些表。

当我启动DMS任务时,它会失败,并且日志显示问题与源系统(Postgres)中DateStyle参数的配置有关。

在源中,该参数设置为'SQL,DMY',DMS告诉我需要将其设置为“ISO”才能进行复制。

2022-06-08T21:22:00 [SOURCE_CAPTURE  ]E:  Bad setting for 'DateStyle' parameter. WAL connection setup is expecting 'ISO'. [1020452]  (postgres_endpoint_wal_engine.c:1341)

我无法在源中更改此配置,因为我们有一个需要将此参数配置为('SQL, DMY')的核心。

是否有其他方法可以进行复制而无需更改此参数?

提前感谢。

profile picture
ESPECIALISTA
feita há 8 meses30 visualizações
1 Resposta
0

【以下的回答经过翻译处理】 我们最终能够找到解决方案:

仅为复制用户设置日期风格:

ALTER USER my_replication_user SET datestyle='ISO, MDY';

为了验证更改是否生效:

SELECT usename,useconfig FROM pg_catalog.pg_user WHERE usename='my_replication_user';

在进行上述更改后,重新启动DMS任务,那就完成了。

profile picture
ESPECIALISTA
respondido há 8 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas