Sumeta — the company behind Bridge
Docs · Reference

Log-based CDC: how capture works

Change data capture reads the transaction log a database already writes. This page explains what each log contains, how the first run establishes a baseline, and where the operational risk actually sits.

Docs · Reference · Updated 2026-11-03 · Applies to current Bridge releases

Definition

Log-based change data capture is the technique of reconstructing inserts, updates and deletes by parsing the source database's native transaction log, using read-only access, instead of issuing repeated queries against user tables.

What each log contains

Log mechanics; parameter names vary by database version.
EngineLogRecord granularityWhat to configure
OracleRedo logRow change with before/after image when supplemental logging is onSupplemental logging, archive log retention, LogMiner or XStream access
MySQLbinlogRow image in ROW formatbinlog_format=ROW, retention period, replication privileges
PostgreSQLWALLogical decoding outputwal_level=logical, replication slot, slot retention monitoring
SQL ServerTransaction logCDC capture instance rowsCDC enabled per table, capture job window
KingbaseESWALLogical decoding outputLogical decoding enabled, slot monitoring
DM / DamengRedoNative log recordsArchive mode and log retention

The important consequence: because the log carries the row image, capture cost is a function of change volume, not table size. A 2-billion-row table with 1,000 daily changes costs about the same to capture as a 2,000-row table with 1,000 daily changes. Polling designs invert that relationship, which is why they degrade as tables grow.

First run: snapshot, then stream

A cold start needs a consistent baseline. Bridge performs an initial snapshot and records the corresponding log position, so changes that commit during the snapshot are replayed afterwards rather than lost. The sequence is:

  1. Record the current log position for each captured table.
  2. Take a consistent snapshot of the table set.
  3. Begin streaming from the recorded position and apply changes, deduplicating against snapshot rows by key.
  4. Store the applied offset so a restart resumes from the last committed point rather than re-snapshotting.

A restart therefore resumes, it does not re-copy. That property is what makes long-running pipelines operationally cheap.

Where the risk actually sits

Operational controls, in order of how often they bite.
RiskSymptomControl
Log retention too shortCapture falls behind and the needed log segment is purgedAlert on offset age vs retention window
Replication slot not consumedWAL accumulates on the sourceMonitor slot lag; alert on retained bytes
Supplemental logging offUpdates arrive without the before-imageVerify source configuration during the POC
Per-key reorderingTarget reflects a stale updatePreserve key ordering across load threads
Backpressure ignoredOffset grows under target throttlingApply backpressure from loader to reader

CDC questions

Is capture read-only?

Yes. Capture uses a read-only log reader; it does not create triggers, shadow tables or write anything to the source.

What is the impact on the source?

Primarily log retention and log-read I/O. In typical deployments capture lag is 40–60s at P95 with no measurable change to source query latency.

Does it capture deletes?

Yes. The log records deletes as well as inserts and updates, which snapshot-diff approaches cannot do reliably.

What happens if the pipeline stops for a day?

It resumes from the last committed offset, provided the required log is still retained. Retention window is therefore a recovery-time parameter you must size deliberately.