Skip to content

How Redshift Handles CDC Replay Safety

May 2026

Redshift replay safety depends on what happens after COPY, because staged files alone do not define the winning row.

Short Answer

Redshift handles CDC replay safety by loading changes into a staging table and then applying them to the target with MERGE guarded by _skippr_order_token comparison. If the same business key appears again during a retry, the older mutation should not overwrite the newer row already present in the target table.

Delete replay safety is handled through tombstone tracking plus conditional deletion. That gives Redshift a concrete record of delete order so a stale reprocessed insert does not silently bring back a row that should still be gone.

Why Teams Struggle with This

This matters because Redshift CDC usually involves multiple steps: files land in S3, COPY loads them into staging, and then MERGE reconciles them into the final table. Retries can happen anywhere in that path. Replay safety comes from the merge contract, not from assuming staged files are unique.

  • A successful COPY only proves data was loaded into staging, not that final state is correct.
  • The target table needs an ordering rule so stale retries lose cleanly.
  • Delete safety has to survive both batch retries and out-of-order reprocessing.
  • Business keys are central because Redshift reconciliation still happens per logical row.

How Skippr Handles It

Skippr keeps the Redshift apply logic reviewable by making the destination behavior explicit: staging tables for load efficiency, _skippr_order_token on CDC-managed targets, and companion tombstone tables for delete safety.

A concrete example: customer_id = 88 is updated twice in source order, and the earlier update is replayed later because the COPY stage is retried. Redshift still keeps the newest state once MERGE compares the incoming token to the token already stored on the target row.

  • Redshift CDC uses a staging-table plus MERGE apply pattern.
  • The staging load typically arrives through S3 COPY before reconciliation.
  • Order-token guards decide which replayed mutation wins for a matched key.
  • Tombstone tables provide anti-resurrection protection for deletes.

What the First Useful Version Looks Like

Redshift replay safety is a reminder that warehouse correctness often happens after the raw load succeeds.

When teams review the MERGE contract instead of only the COPY path, final-state behavior gets much easier to trust.