DMS task fails when Postgres DateStyle parameter is not ISO

0

Hi everyone.

I need to replicate some tables from a Postgres 11.14 database on an Amazon EC2 instance with DMS.

When I start the DMS task, it fails and the log shows me that the problem has to do with the configuration of the parameter DateStyle in the source system (Postgres).

In the source this parameter is set to 'SQL, DMY' and DMS tells me that needs it set up to 'ISO' to do the replication.

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)

I cannot change this configuration in the source because there we have a Core that needs this parameter to be configured like that ('SQL, DMY').

Is there another way in which we can replicate without having to change this parameter?

Thanks in advance.

已提問 2 年前檢視次數 493 次
2 個答案
0
已接受的答案

We were finally able to find the solution:

Set datestyle only for the replication user:

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

For verifying whether the change has taken effect:

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

After making the above changes, restart the DMS task and that's all.

已回答 2 年前
0

Can you use Logical Replication (which is far better than DMS) to replicate instead? What is the target?

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南