'AWS DMS Error - Unable to use plugins to establish logical replication on source PostgreSQL instance

I'm getting this error trying to replicate a postgre database (not RDS) to another postgre database (also not RDS). I get this connection error but the endpoints (source and target) are tested successfully. Any ideas?

Error: Last Error Unable to use plugins to establish logical replication on source PostgreSQL instance. Follow all prerequisites for 'PostgreSQL as a source in DMS' from https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html Task error notification received from subtask 0, thread 0 [reptask/replicationtask.c:2880] [1020490] Remaining 1 error messages are truncated. Check the task log to find details Stop Reason FATAL_ERROR Error Level FATAL



Solution 1:[1]

I used DMS to reduce over-provisioned RDS storage size. Set following values in db parameter group in both source and destination endpoints and restart. Maybe this will help for non-RDS endpoints if you add the same in Postgres configuration.

logical_replication = 1
max_wal_senders = 10
max_replication_slots = 10
wal_sender_timeout = 0
max_worker_processes = 8
max_logical_replication_workers = 8
max_parallel_workers = 8
max_worker_processes = 8

Solution 2:[2]

You need at least to set logical_replication = 1 in your source database configuration.
And then set the max_replication_slots = N, N being higher or equal to the number of replication processes you plan to run.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2