1. Enable logical replication
Create or modify a custom parameter group for your database instance and set the following parameters:rds.logical_replication
: Set to1
. This enables logical replication on the instance.wal_level
: This should automatically be set tological
whenrds.logical_replication
is enabled. You can verify this setting.
For Aurora PostgreSQL, it is also recommended to set
rds.logical_wal_cache
to 0
to avoid a known data loss issue affecting certain versions (e.g., 14.5, 13.8, 12.12, 11.17).If you plan to create multiple CDC sources, ensure max_wal_senders
is greater than or equal to the number of sources.2. Apply the parameter group
Modify your RDS or Aurora instance to use the newly configured parameter group. This change typically requires a reboot of the database instance to take effect.3. Grant required privileges
Connect to your database and grant therds_replication
role to your user. This role provides the necessary permissions to manage logical replication slots and stream data.