Set wal_level=logical in postgresql.conf and create a replication slot: SELECT pg_create_logical_replication_slot('debezium_slot', 'pgoutput').
Create a publication covering the tables to capture: CREATE PUBLICATION debezium_pub FOR TABLE orders, customers.
Create a Debezium Postgres user with REPLICATION privilege: CREATE ROLE debezium WITH REPLICATION LOGIN PASSWORD '...' and grant SELECT on target tables.
Deploy the connector via Kafka Connect REST with connector.class=io.debezium.connector.postgresql.PostgresConnector, plugin.name=pgoutput, slot.name=debezium_slot, publication.name=debezium_pub, and standard connection properties.
Monitor replication lag by querying pg_replication_slots to check confirmed_flush_lsn vs pg_current_wal_lsn() and set up alerting on growing lag.
Known gotchas
An inactive or stalled replication slot causes PostgreSQL WAL to accumulate indefinitely because WAL cannot be recycled past the slot's confirmed_flush_lsn; this can fill disk on busy databases.
pgoutput requires PostgreSQL 10+; for older versions use the wal2json plugin instead, but note that wal2json change events have a different schema than pgoutput events.
TOAST columns (values exceeding the page size stored out-of-line) only appear in change events when they are actually modified; unchanged TOAST columns are emitted as a special unavailable-in-source sentinel value, which can confuse downstream consumers.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp