Every time you save a row to a database, that database writes the change to a special append-only file before it touches the actual data pages. In PostgreSQL that file is called the write-ahead log (WAL); in MySQL it is the binary log. The log was invented for crash recovery, but it carries something valuable: an ordered, complete record of every INSERT, UPDATE and DELETE that ever happened.
Change Data Capture (CDC) is the technique of reading that log and turning each entry into an event that downstream systems can consume. Instead of polling a table every few seconds and guessing what changed, a CDC pipeline reads the log in real time — giving you exactly what changed, in what order, with no missed updates.
This sounds simple, but the details are where engineering lives: how do you start reading mid-stream without losing history? What happens when a schema changes? How do you handle transactions that span multiple tables? These questions push CDC from a tailing trick into a discipline of its own.
Comments
Loading comments...