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.

asked 2 years ago484 views
2 Answers
0
Accepted Answer

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.

answered 2 years ago
0

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

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions