Change Data Capture Tools
CDC Tools Compared for Postgres (2026)
The right change data capture tool depends on where the changes go and who runs it. Debezium fits streams to Kafka, and AWS DMS or Datastream fit teams inside a single cloud. Fivetran and Airbyte load warehouses. Flink CDC handles stream processing, and built-in logical replication covers Postgres to Postgres. For Postgres, all of them read the write-ahead log through a replication slot, and that slot is the part to plan for.
The best CDC tools for Postgres depend on where the changes go
Almost every serious Postgres CDC tool does the same thing underneath: it reads the write-ahead log through a logical replication slot. What differs is who runs it, where the changes land and what happens when it falls behind. Pick on those 3 questions.
If the changes feed several consumers through Kafka, Debezium is the usual fit. If the target is a warehouse and nobody wants to run infrastructure, a managed service such as Fivetran or Airbyte Cloud fits. Inside AWS, AWS DMS sits next to the source; inside Google Cloud, Datastream does. Between 2 Postgres databases, the built-in logical replication needs no extra tool.
4 Postgres CDC tools on the same criteria
- Reads Postgres via
- Run by
- Replication slot
- Reads Postgres viapgoutput or decoderbufs
- Run byYou (Connect or Server)
- Replication slotCreates one if missing
- Reads Postgres viapglogical, test_decoding
- Run byAWS replication instance
- Replication slotOne slot per task
- Reads Postgres viapgoutput (via Debezium)
- Run byYou or Airbyte Cloud
- Replication slotOne dedicated slot
- Reads Postgres viapgoutput
- Run byFivetran (managed)
- Replication slotOwn slot (log-based)
Log-based vs query-based CDC tools
A log-based tool decodes the transaction log. A query-based tool polls each table for rows that changed since the last run, using an updated-at column or a system column. The split decides what the destination can know. A poll cannot see a row that was deleted between 2 runs, and it only sees the last state of a row that changed twice.
Fivetran documents this for Postgres: its logical replication mode sets _fivetran_deleted on a deleted row, while its query-based mode, which replaced the older XMIN method, does not recognise deletes unless delete capture is turned on. Airbyte describes CDC as the only one of its Postgres sync methods that records deletes. If the destination must mirror deletes or keep every intermediate change, choose a log-based tool. For the mechanics in general, see what change data capture is and how log-based CDC works.
Know Change Data Capture Tools the way the interviewer who asks it knows it.
Postgres logical replication and decoding plugins
Postgres decodes its log through an output plugin. pgoutput is the standard plugin since PostgreSQL 10 and needs no extra install. Debezium also supports decoderbufs, a Protobuf plugin the Debezium community maintains. AWS DMS uses pglogical when it is installed on the source and test_decoding otherwise. Fivetran and Airbyte both use pgoutput, and Airbyte requires PostgreSQL 14 or later for CDC.
The server also ships a complete logical replication feature: a publication on one database and a subscription on another. It takes a snapshot of each table, then streams changes in publisher order, which keeps a single subscription transactionally consistent. For copying a Postgres database to another Postgres database, it's the tool with the fewest parts. Its restrictions matter for anything else: DDL isn't replicated, sequence data is not replicated and large objects aren't replicated, so schema changes have to be applied to the subscriber by hand.
Postgres settings every log-based CDC tool depends on
wal_levelmax_replication_slotsmax_wal_sendersREPLICATIONpublicationREPLICA IDENTITYmax_slot_wal_keep_sizeidle_replication_slot_timeoutThe replication slot is the failure every Postgres CDC tool shares
A replication slot tells Postgres how much WAL a consumer still needs. The PostgreSQL documentation on logical decoding warns that slots persist across crashes, know nothing about their consumers and keep WAL even when nothing is connected, and in extreme cases that can shut the database down to prevent transaction ID wraparound. Whichever CDC tool you pick, a stopped consumer turns into disk growth on the primary.
The arithmetic is short. A primary that writes 10 MB of WAL per second produces 10 x 3,600 x 6 = 216,000 MB, about 216 GB, in 6 hours. With the default max_slot_wal_keep_size of -1 the slot keeps all of it. Setting the cap to 50 GB, as in the replication settings reference, bounds the disk, but the cap is reached 83 minutes into the outage and the slot can no longer continue. Airbyte documents that outcome: the sync fails, can't recover on its own, and needs the slot dropped and a full re-sync.


Plan for it before launch. Alert on retained WAL per slot from pg_replication_slots, choose a cap smaller than your free disk, and decide who re-syncs when a slot is lost. On Postgres 17 and later, a logical slot can fail over to a hot standby through its failover option and sync_replication_slots. Fivetran notes that without a synchronised slot after a failover, a connection may need a historical re-sync.
Debezium: the open-source engine under many CDC tools
Debezium is Apache 2.0 licensed and runs in 3 ways. As a Kafka Connect connector, the most common form, it writes each table's changes to Kafka topics. As Debezium Server it streams to messaging systems without Kafka. As the Debezium Engine it is a Java library embedded in your own application. Airbyte's Postgres CDC runs on Debezium too, so a Debezium question is often an Airbyte question.
Its strength is fan-out and control: one stream of row changes that many consumers read at their own pace, with snapshot modes you choose. The cost is that you operate Kafka Connect and the slot, and you own the schema handling. Delivery is exactly once in normal operation and at least once after a crash, so sinks should deduplicate. The comparison of Kafka Connect and Debezium covers how the pieces fit.
Managed CDC services: AWS DMS, Datastream, Fivetran and Airbyte
AWS DMS runs tasks on a replication instance, with full load plus CDC or CDC only. Each task uses its own slot, and a slot stays open after the task stops, so unused slots must be deleted by hand. DMS can also fail a task when a lagging slot falls past a set max_slot_wal_keep_size. It fits teams already in AWS that want a managed path from RDS or Aurora.
Google Datastream is a serverless CDC and replication service. Its sources include PostgreSQL, MySQL, Oracle, SQL Server and MongoDB, and it writes to BigQuery and Cloud Storage. It fits a Google Cloud team that wants changes in BigQuery without running a connector.
Fivetran and Airbyte are warehouse-loading platforms with a Postgres CDC mode. Fivetran is fully managed and supports Postgres 10 through 18. Airbyte runs self-hosted or in its Cloud, and its CDC needs a dedicated slot and a publication. Both are built to load tables into a warehouse and don't fan out to many consumers. For the wider tool set, see open-source ETL tools compared.
Flink CDC and PeerDB for narrower jobs
Flink CDC is an Apache project, described in its documentation as a distributed data integration tool for real-time and batch data, with pipelines written in YAML. Its source connectors cover Postgres, MySQL, Oracle, SQL Server and MongoDB, among others. Pipeline sinks include Kafka, Doris, StarRocks and Iceberg. It fits teams that already run Flink and want to transform changes in flight.
PeerDB is a Postgres-first data movement platform with WAL-based CDC and a query-based mode. Postgres is its only named source, which makes it a narrow tool by design, and its documentation says a caching mechanism removes the need for REPLICA IDENTITY FULL on TOAST columns. Its published speed claims come from the vendor, so test it on your own tables.
Which CDC tool fits which situation
| Situation | Tools that fit | Why |
|---|---|---|
| Changes feed several consumers through Kafka | Debezium on Kafka Connect | Events land in topics that each consumer reads at its own pace |
| Changes go to 1 destination without Kafka | Debezium Server, Flink CDC | Both stream to sinks directly, and Flink CDC can transform on the way |
| Small team loading a warehouse | Fivetran, Airbyte | Both run log-based Postgres CDC and manage the connector |
| Everything runs in AWS | AWS DMS | A replication instance next to the source, full load plus CDC |
| Target is BigQuery on Google Cloud | Datastream | Serverless, with BigQuery and Cloud Storage as destinations |
| Postgres to Postgres in 1 organisation | Built-in logical replication | No extra service, but DDL and sequences need manual handling |
| Postgres is the only source | PeerDB, Debezium | PeerDB is built for Postgres, and Debezium covers it among many sources |
How CDC tools come up in data engineering interviews
Interviewers rarely ask for a tool ranking. They ask you to design a pipeline that mirrors an orders database into a warehouse, then probe the failure modes of CDC: what happens to deletes, what a stalled slot does to the primary, how a restart avoids duplicates and how a schema change flows through. Naming the slot and its WAL retention shows you have run one.
Practice that reasoning with the CDC pipeline interview questions, the data pipeline interview questions and the data pipeline practice problems. The system design round guide shows where a CDC design fits in the loop.
Change data capture tools FAQ
What are the best CDC tools for Postgres?+
What is a CDC tool?+
Is Debezium the only open-source CDC tool?+
Do CDC tools capture deletes?+
What is the biggest operational risk of Postgres CDC?+
Does CDC deliver each change exactly once?+
The candidate who gets the offer
- 01
Reading a solution is not the same as writing one
Every engineer who has frozen on a query they had read a dozen times knows the gap. The only preparation that closes it is producing the answer yourself, under time, before the interview does it for you
- 02
76% of hiring managers reject on the coding task, not the resume
From HackerRank's 2024 Developer Skills Report. Candidates who look strong on paper still fail the live screen if they haven't done timed, executable practice
- 03
System design comes down to the calls you defend out loud
Ingestion, batch vs streaming, the bronze/silver/gold layers, idempotency, backfill and replay. Sketching the pipeline and naming the failure modes is the signal, not the boxes
Related guides
What is change data capture
How log-based CDC works and why it beats polling
Kafka Connect vs Debezium
How the 2 fit and when to use each
CDC pipeline interview questions
Questions on designing and operating CDC pipelines
Data pipeline interview questions
The pipeline design questions interviewers ask
Data pipeline practice problems
Pipeline design problems to practice before the loop
System design round
What the design round asks and how to prepare
This week's community challenge
Dirty, production-shaped data, scored blind each week.