Table of Contents
Question
A company uses an Amazon RDS for PostgreSQL database in the us-east-2 Region. The company wants to have a copy of the database available in the us-west-2 Region as part of a new disaster recovery strategy.
A database architect needs to create the new database. There can be little to no downtime to the source database. The database architect has decided to use AWS Database Migration Service (AWS DMS) to replicate the database across Regions. The database architect will use full load mode and then will switch to change data capture (CDC) mode.
Which parameters must the database architect configure to support CDC mode for the RDS for PostgreSQL database? (Choose three.)
A. Set wal_level = logical.
B. Set wal_level = replica.
C. Set max_replication_slots to 1 or more, depending on the number of DMS tasks.
D. Set max_replication_slots to 0 to support dynamic allocation of slots.
E. Set wal_sender_timeout to 20,000 milliseconds.
F. Set wal_sender_timeout to 5,000 milliseconds.
Answer
B. Set wal_level = replica.
C. Set max_replication_slots to 1 or more, depending on the number of DMS tasks.
E. Set wal_sender_timeout to 20,000 milliseconds.
Explanation
The correct answers are B, C, and E. To support CDC mode for the RDS for PostgreSQL database, the database architect must configure the following parameters:
- B. Set wal_level = replica. This parameter determines how much information is written to the write-ahead log (WAL), which is a log of changes made to the database. The wal_level must be set to replica or higher to enable replication slots, which are required for CDC mode. The replica level writes enough information to allow a standby server to replay the WAL and apply the same changes.
- C. Set max_replication_slots to 1 or more, depending on the number of DMS tasks. This parameter determines the maximum number of replication slots that can be created in the database. Replication slots are data structures that store information about the WAL for each replication connection. AWS DMS uses replication slots to track the changes made to the source database and apply them to the target database in CDC mode. The max_replication_slots must be set to 1 or more, depending on the number of DMS tasks that need to connect to the source database.
- E. Set wal_sender_timeout to 20,000 milliseconds. This parameter determines the maximum time that a WAL sender process waits for a response from a replication connection before terminating it. A WAL sender process is a background process that streams WAL data from the source database to a replication connection. AWS DMS uses a replication connection to receive WAL data from the source database and send it to the target database in CDC mode. The wal_sender_timeout must be set to 20,000 milliseconds or higher to avoid timeouts and errors in CDC mode.
The other options are incorrect because:
- A. Set wal_level = logical. This is false because this parameter is not required for CDC mode with AWS DMS. The wal_level = logical enables logical decoding, which is a feature that allows extracting data changes from the WAL in a user-defined format. Logical decoding is not used by AWS DMS, which uses physical replication based on replication slots.
- D. Set max_replication_slots to 0 to support dynamic allocation of slots. This is false because this parameter would disable replication slots, which are required for CDC mode with AWS DMS. The max_replication_slots must be set to a positive value to enable replication slots and allow AWS DMS to track and replicate changes from the source database.
- F. Set wal_sender_timeout to 5,000 milliseconds. This is false because this parameter would cause frequent timeouts and errors in CDC mode with AWS DMS. The wal_sender_timeout must be set to 20,000 milliseconds or higher to ensure a stable and reliable replication connection between the source and target databases.
Reference
Amazon AWS Certified Database – Specialty certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Amazon AWS Certified Database – Specialty exam and earn Amazon AWS Certified Database – Specialty certification.