HeadlinesBriefing favicon HeadlinesBriefing.com

Snowflake Pushes CDC from Postgres into Iceberg

Hacker News •
×

Making data from transactional databases available to analytical databases is essential but often fragile. When building a Postgres service at Snowflake, solving this problem became the top priority.

Postgres is an excellent operational database, but its change data capture (CDC) story is lacking. Replication tools struggle with schema changes, snapshots, and failures. To build a reliable experience for Snowflake Postgres, the team reinvented Postgres replication from the ground up.

Data Mirroring, now in public preview, performs highly resilient replication into Snowflake with low cost, low lag, and transactional consistency. It pushes changes directly from Postgres into Apache Iceberg tables in transactional batches, which are automatically applied serverlessly in Snowflake.

Instead of external systems consuming changes, the snowflake_cdc extension pushes batches into per-table change logs and a meta log. This approach avoids infrastructure problems and decouples producer from consumer via object storage. The apply process in Snowflake acts as a finite state machine, processing all instructions in the meta log to ensure correct sequencing.

Using transactions as a distributed systems building block eliminates many failure modes. Snowflake's Postgres for your data lake enables transactions across Postgres and Iceberg tables. Data Mirroring leverages this to push batches and schema changes in one Postgres-side transaction, preserving foreign keys and join correctness.