Narissa Tsuboi
← Talks

From WAL to Kafka: Turning Postgres Changes into Event Streams

04 Jun 2026 · Seattle Postgres · Seattle, WA

How PostgreSQL logical replication and the Debezium connector turn row-level database changes into Kafka event streams via Change Data Capture.


Slide titled Replication Slot Positions. A bar splits the WAL into three zones: OK to recycle, held for Debezium, and incoming / not yet read, with restart_lsn and confirmed_flush_lsn marking the boundaries. A warning says that if the connector goes offline the held zone grows, WAL accumulates and the disk fills up.
Slide 15 from the talk: Diagram I made to help visualize the replication slot log sequence numbers in relation to the debezium connector's progress.

I gave this talk at the Seattle Postgres meetup in June 2026. Using a fictitious scenario where the audience and myself are software engineers at a fictitious AI company with a fictitious AI agent (Anthropix and Clyde), we learned how Postgres logical replication, together with replication slots and the Debezium connector, turn row-level changes into Kafka event streams via Change Data Capture – and how CDC can power downstream operations at Anthropix as it scales.

It also covered the key configuration on both the Postgres and connector sides, common use cases, monitoring replication lag and WAL growth, and the production performance tradeoffs.

Something that really bothered me when learning about the write ahead log was that I couldn’t outright read the log entries in human words instead of bytes. So this talk also included a demo of how to decode the WAL to JSON in real time, visualize each row level change, then that row level change as an event in Kafka.

The video isn’t uploaded yet, but you can check out other Seattle Postgres talks on the SEAPUG YouTube channel.

Demo code

Thank you

  • Jeremy Schneider · Organizer

    Thank you for encouraging me to speak on this topic, and for teaching me about the WAL!

Slides

Open PDF in a new tab →

Related