- Newest
- Most votes
- Most comments
I understand you're experiencing critical CDC failures after a Redshift maintenance update. While I cannot confirm specific version-related regressions or provide information about unreleased patches, I can offer guidance based on common DMS-to-Redshift CDC issues.
Regarding your staging table and BatchApplyEnabled concerns:
The issues you're describing with staging table column sizing and batch apply settings are not typical expected behaviors. For CDC to function properly with Redshift targets, several prerequisites must be met:
-
Source table requirements: Verify that all source PostgreSQL tables have primary keys defined. For PostgreSQL sources, captured tables must have a primary key for DMS to properly process DELETE and UPDATE operations during CDC.
-
Permissions verification: Ensure the AWS account that DMS uses has the required permissions for both the source Aurora PostgreSQL database and the target Redshift cluster.
-
Change log retention: Confirm that the change logs retention period on your source database is set to at least 24 hours to prevent CDC data loss.
Troubleshooting steps:
-
Review your DMS task logs for specific error messages related to the affected tables, particularly around the transition from full load to CDC mode.
-
Monitor the CDCLatencySource and CDCLatencyTarget CloudWatch metrics for your DMS tasks to identify where delays or failures are occurring.
-
Check the
awsdms_apply_exceptionstable in your Redshift database for detailed error information about failed CDC operations. -
Consider creating a validation-only task to identify data inconsistencies between source and target.
For the column type and batch apply issues specifically:
If you're seeing unexpected behavior with task settings being ignored or staging tables created with incorrect column definitions, I recommend:
- Opening an AWS Support case with detailed logs, task configurations, and examples from your system table queries
- Providing the specific DMS engine version you're using (not just the Redshift version)
- Including CloudWatch logs and any error messages from
stl_load_errors
This appears to be a complex issue that may require direct AWS Support investigation, especially if settings are being silently reverted and staging tables are being created with insufficient column sizes for your data types.
Sources
Resolve data replication issues with AWS DMS migration to Amazon Redshift | AWS re:Post
Thanks for the recommendations. My feedback in the following:
- AWS support case: we're not running on AWS Business support. Thus, no support case can be created
- The DMS engine version did not change for months and still is 3.6.1
stl_load_errorsare included in the original inquiry
Good afternoon Kmang and aws support,
Human with over a decade on aws here, some important corrections to your question:
Bug 2 is not a bug, BatchApplyEnabled=true is the only possible CDC option for Redshift targets, it's mentioned somewhere in the docs, also architecturally it makes sense, OLAP vs OLTP.
Bug 3: PostgreSQL array column types (TEXT[], INT[], etc.) is another well know limitation, since redshift only supports semistructured types / type SUPER where a single value in a struct cannot be longer than 65k characters (Redshift's max character length).
Bug 1 is where you're definitely right, same here I've started observing this issue since March 8 (v1.0.232773 (patch 199)).
AWS support can you investigate this with the DMS engineering team properly?? The seg1 in the awsdms_changes* was never a problem, tables with VARCHAR type primary keys like UUIDs were always fine, it would fit in the table.
Please let us know, I was also just about to open the same issue, and quickly checked if anyone else is experiencing this.
As a result of this bug, we're having to regularly restart our tasks, and manually adjust the managed (awsdms_changes*) tables, currently it remains as a critical issue for some of our production analytical workloads.
Thank you.
Some update on the matter. We did receive feedback from AWS (via our AWS Solution Architect) which I'd like to share here:
We have identified an issue affecting your DMS task with Redshift target during CDC replication. DMS task may fail, reporting the following error: "[TARGET_APPLY ]E: RetCode: SQL_ERROR SqlState: XX000 NativeError: 0 Message: [Redshift][ODBC Driver][Server]XX000:ERROR: Load into table'awsdms_changesXYZ". Check 'stl_load_errors' system table for details."
-> Root Cause This is caused by a behavioral change in the Redshift ODBC 2.x driver related to how VARCHAR column sizes are detected. During batch apply operations (UPDATEs and DELETEs), DMS creates a temporary net changes table in Redshift. Due to this driver behavior, the temporary table may be created with a column length that is insufficient to hold the primary key value, causing the load to fail. Based on our investigation, this issue currently affects tasks replicating from a PostgreSQL source where a TEXT column is part of the primary key.
-> Workaround There is no workaround available at this time.
-> Resolution Our engineering team is actively working on a fix in coordination with the Amazon Redshift team. We will update this ticket as soon as the fix is ready for deployment.
I'll update this post accordingly once there are news to share.
kmang any updates here? I found your post a couple of weeks ago because we were experiencing the same issues with CDC and have been manually doing full reloads in the interim but really hoping to get back to a more automated experience.
Hi huey, unfortunately no update here. I raised this matter already multiple times towards our AWS account managers but the ODBC patch is not yet applied. In the meantime we have migrated some data replication workloads to another tool as DMS is not working reliably atm.
Thanks for the update kmang, we're experiencing the same and have raised the issue with support but have yet to hear anything back.
We've found success manually altering the staging table column type to unblock, but it requires manual intervention multiple times per day.
We've got the exact same issue (bug 1). We have around 24 source Postgres databases using TEXT PKs, CDC is completely broken for all of them since patch 199. The DMS tasks are all green stating replication is ongoing, but all of the changes are just piling up on disk. Redshift is reporting the error "String length exceeds DDL length" as the seg1 column is being set to varchar(20) on the DMS staging tables, but we have PKs varying from anywhere between 24 to 39 characters. We're only able to move data into Redshift by doing full loads of the tasks, but it's broken all of our analytics as we rely on CDC with data updating regularly for our queries.
Relevant content
- asked 3 years ago
- asked 3 years ago

Upvoted. Our data pipelines are currently broken due to this bug.