One Postgres WAL slot, four destinations: lightweight CDC fan-out with pgstream

October 20–23
Level: Intermediate

Postgres databases are usually the source of truth of other data stores and tools: search indexes, downstream replicas, webhooks, analytics warehouses. Most teams get there by putting together triggers, cron jobs, dual writes, Debezium, and scripts. Each with its own failure mode, its own operational burden, and its own way of drifting from the source of truth.

Using pgstream, an open-source Go CLI tool and library that uses Postgres logical replication to stream schema and data changes, we will walk through each target:

  • Postgres: an ALTER TABLE on the source appears on the target seconds later. A dive into DDL replication and TOAST + REPLICA IDENTITY discussion.
  • OpenSearch: a row insert lands as a search hit. We look into challenges of type mapping, out-of-order events versus LSN as a document version, and the cost of renames in an immutable mapping.
  • Kafka: a row insert becomes a topic message. A glimpse into partitioning, ordering versus throughput, and a side-by-side comparison with Debezium.
  • Webhooks: a row insert fires an HTTP POST. This is the entry point for idempotency, retry, and the discussion of database triggers.

Each demo is short and self-contained. Then we go through the relevant Postgres mechanics. We'll close with a comparison with Debezium and native logical replication.

Attendees will leave with a mental model of CDC fan-out as a set of Postgres primitives; a list of the gotchas (TOAST, identity, ordering, DDL, slot lag); and operational knowledge to decide whether a lightweight approach fits their stack or not.

Back

Join Us For PostgreSQL Conference Europe 2026

October 20–23 2026

Palacio de Congresos, Valencia, Spain