Recipe
Change Data Capture
Stream every insert, update, and delete from your operational database into Meridian in near real time. This recipe wires a Postgres logical replication slot into a Meridian ingestion pipeline so downstream consumers see a consistent, ordered change log without writing custom polling code.
1. Enable logical replication
On the source Postgres instance, set wal_level=logical, allocate at least one replication slot, and grant the Meridian role theREPLICATION attribute. Restart the server so the WAL writer begins emitting full row images.
2. Create the Meridian source
Register a Postgres CDC source in the Meridian dashboard. Point it at the publication you want to capture and supply the replication slot name. Meridian will perform an initial snapshot, then tail the WAL using thepgoutput plugin.
CREATE PUBLICATION meridian_cdc FOR TABLE orders, customers; SELECT pg_create_logical_replication_slot( 'meridian_slot', 'pgoutput' ); GRANT REPLICATION ON DATABASE prod TO meridian;
3. Route changes downstream
Attach one or more sinks to the source: a warehouse for analytics, a search index for user-facing queries, or a webhook for event-driven services. Meridian preserves transaction boundaries and emits a monotonic LSN so consumers can resume exactly where they left off after a restart.