<@U04S8PLJWMT>, airbyte stops incremental replicat...
# replication-ask-ai
s
@kapa.ai, airbyte stops incremental replication with giving any errors I have CDC postgres to postgres replication, Airbyte stops incremental replication without any errors
k
This is a known issue with Postgres CDC in Airbyte. Here are the most common causes and fixes when incremental CDC replication silently stops (successful syncs with 0 records): 1. WAL Resume Position Timeout The connector may be timing out while searching for the WAL resume position. You'll see a log like:
Copy code
Searching for WAL resume position
Source has no more messages, closing connection.
Fix: Increase the Initial Waiting Time in Seconds (Advanced) setting on the connector. One user resolved this by setting it to
2400
. [GitHub Issue] 2. WAL Offset Not Advancing (confirmed_flush_lsn stuck) If
confirmed_flush_lsn
in
pg_replication_slots
isn't advancing, WAL files accumulate and the connector can't find its resume position. This is especially common on databases with low transaction volumes. [Troubleshooting Docs] Fix (read-only): Add a high-volume table to the publication to advance the LSN:
Copy code
ALTER PUBLICATION <publicationName> ADD TABLE <high_volume_table>;
Fix (with write access): Set up a heartbeat table:
Copy code
CREATE TABLE airbyte_heartbeat (
    id SERIAL PRIMARY KEY,
    timestamp TIMESTAMP NOT NULL DEFAULT current_timestamp,
    text TEXT
);
ALTER PUBLICATION <publicationName> ADD TABLE airbyte_heartbeat;
Then configure the Debezium heartbeat query in the connector settings:
Copy code
INSERT INTO airbyte_heartbeat (text) VALUES ('heartbeat')
[Troubleshooting Docs] 3. WAL Purged Before Sync If WAL files are purged between syncs, Airbyte may trigger a full refresh (or silently produce 0 records). You'll see this log: >
Saved offset is before Replication slot's confirmed_flush_lsn, Airbyte will trigger sync from scratch
Fixes: • Sync more frequently • Increase
wal_keep_size
on your Postgres server [Troubleshooting Docs] 4. Filtered Events Not Advancing the Slot If events are being received but filtered out, you'll see logs like:
Copy code
Received 10001 events which were all filtered out, so no offset could be committed.
This means there's a mismatch between your publication and the Airbyte catalog. Ensure all tables in your publication are also in your Airbyte connection catalog, or use the heartbeat fix above. [Forum Discussion] 5. Invalid CDC Position Behavior Setting Check the Invalid CDC position behavior (Advanced) setting on your connector. An incorrect setting here can cause silent 0-record syncs. [GitHub Issue] Quick checklist: • Check
pg_replication_slots
to see if
confirmed_flush_lsn
is advancing • Review connector logs for the WAL resume position search timeout • Ensure your publication and Airbyte catalog are in sync • Consider enabling the heartbeat query for low-traffic databases 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.