Skip to main content
Change Data Capture (CDC) reads the database change log instead of scanning whole tables. You get:
  • Near–real-time inserts, updates, and deletes at the destination
  • Deletes included (incremental mode does not capture deletes)
  • Lower load on the source than repeated full scans
Works in Hosted or Agent mode — same CDC setup on the database either way.

How CDC works

Postgres (WAL), MySQL (binlog), and MongoDB (change streams) already write a change log. Zwiron reads that log and applies changes to the destination, remembering a checkpoint so jobs resume after a restart.

Sources that support CDC

Need CDC on another database? Request a connector.

Setting up CDC on PostgreSQL

1. Enable logical replication

In your postgresql.conf:
Restart Postgres after changing these settings.

2. Create a replication user

3. Create a publication

Zwiron will automatically create a replication slot and publication when CDC is first enabled. Or you can create it manually:

4. Use CDC in Zwiron

When creating a pipeline, select CDC as the sync mode. Full Cloud SQL / RDS steps: PostgreSQL connector.

Setting up CDC on MySQL

1. Enable binary logging

In your my.cnf:
Restart MySQL after changing these settings.

2. Create a replication user


Requirements for CDC

  • Primary key required — every table you want to CDC must have a primary key. Zwiron uses this to identify which row to update or delete at the destination.
  • Replication must be enabled — see the database-specific instructions above.
  • Log retention — keep the change log long enough for Zwiron to catch up. If a job is offline too long and the log is truncated, Zwiron may need a full re-sync.

CDC vs. Incremental

Use Incremental for efficiency. Use CDC for near–real-time sync or deletes.

Checkpointing

Zwiron saves a position in the change log (LSN / binlog position) after each successful batch. After a restart, the job resumes from that checkpoint.

What happens if CDC falls behind?

If the job is offline long enough that the database truncates old log entries, Zwiron detects the gap and full-resyncs the affected tables. You’ll see that in the job logs.
Last modified on August 1, 2026