# Three Postgres sources need CDC

Canonical URL: <https://datadriven.io/problems/three-postgres-sources-need-cdc-orders-has-10m-writes-per-d-79974435>

Domain: Pipeline Design · Difficulty: medium

## Problem

Three Postgres sources need CDC. orders has 10M writes per day; doubling that with triggers would force a larger instance. shopping_cart deletes are critical to capture and the existing query-based ingestion misses them. legacy_events runs on a hosted Postgres without WAL access, so log-based CDC is unavailable. The section names three CDC families: trigger-based (captures deletes; doubles writes), query-based (cheap; misses hard deletes), and log-based (low overhead; needs WAL access and slot management). Identify the CDC family by replacing each source's ingest transform with one whose name states the chosen family and the deal-breaker that ruled out the alternatives.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/three-postgres-sources-need-cdc-orders-has-10m-writes-per-d-79974435)
- [System Design Interview Questions](https://datadriven.io/data-engineering-system-design)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.