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 réponses
0
Réponse acceptée

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.

répondu il y a 2 ans
0

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

répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions