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.

posta 2 anni fa493 visualizzazioni
2 Risposte
0
Risposta accettata

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.

con risposta 2 anni fa
0

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

con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande