A company is migrating a self-managed, on-premises PostgreSQL database to an Amazon Aurora PostgreSQL-Compatible Edition DB cluster. A Solutions Architect successfully converts the database schema using the AWS Schema Conversion Tool (AWS SCT) and applies it to the target cluster. To migrate the data with minimal downtime, the architect plans to use AWS Database Migration Service (AWS DMS) with full load and Change Data Capture (CDC) enabled. However, when starting the DMS task, the full load completes successfully, but the task fails immediately upon transitioning to the CDC phase. Which configuration change must be applied to the source PostgreSQL database to resolve this issue?
- Modify the postgresql.conf file to set wal_level = logical, increase max_replication_slots and max_wal_senders to accommodate the migration tasks, and restart the PostgreSQL database instance.Answer
- BModify the postgresql.conf file to set wal_level = replica, enable replication parameters, and perform a configuration reload without restarting the database server.
- CCreate a cron job on the source server to copy write-ahead logs (WAL) to an Amazon S3 bucket, and configure the AWS DMS source endpoint to read directly from the S3 bucket using the pg_wal engine.
- DEnable logical replication on the target Aurora PostgreSQL DB cluster's parameter group, and establish a replication slot on the target cluster pointing back to the source.
Answer
Modify the postgresql.conf file to set wal_level = logical, increase max_replication_slots and max_wal_senders to accommodate the migration tasks, and restart the PostgreSQL database instance.
The correct answer is to modify the postgresql.conf file to set wal_level to logical, increase replication slots and WAL senders, and restart the database. AWS DMS requires logical replication to capture changes on PostgreSQL sources. Setting wal_level to logical enables the writing of logical replication data to the WAL, which is consumed by logical decoding plug-ins via replication slots.
Step-by-Step Solution
Key Concept
Configuring PostgreSQL sources for AWS DMS CDC requires setting the WAL level to logical and provisioning replication slots.