- 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
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 yourpostgresql.conf:
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 yourmy.cnf:
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.