Hey team, I've setup a a Postgres Connector using...
# replication-troubleshooting
w
Hey team, I've setup a a Postgres Connector using CDC in Airbyte Cloud for the first time. I am very new to CDC so not 100%. My connection keeps failing with the error
java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: can no longer get changes from replication slot \"airbyte_slot\"\n  Detail: This slot has been invalidated because it exceeded the maximum reserved size.
• What is this error hinting at exactly? • I imagine it means that the amount of data Airbyte is trying to load is to large for the replication slot <- is this correct? If my interpretation of the error above is true, I imagine reducing the amount of data Airbyte is loading at once will resolve it: • I've tried manually updating the connection state for my stream to get it to load more recent data and ultimately reduce the size of the data it's loading. ◦ I used the connection state from our existing connection to our prod PG DB for the JSON (since I don't have a successful run of the connection so far and any data in the connection state). ◦ Is this what a connection state for an incrementally loaded stream setup in a connector leveraging CDC look like? • Doing this return the error
Failure in source: You've changed replication modes - please reset the streams in this connector
(screenshot 2) • Why is this error being returned? Is it not allowed for me to reset the connection state manually?
From additional research it looks like manually updating the Connection State this way doesn't make sense as Airbyte uses a completely separate method for keeping track of the state between the CDC and User Defined Cursor method
h
The error ERROR: can no longer get changes from replication slot "airbyte_slot" ... This slot has been invalidated because it exceeded the maximum reserved size means that the replication slot used for Change Data Capture (CDC) has become invalid. This occurs because PostgreSQL removed the Write-Ahead Log (WAL) files needed for the replication slot. WAL files are purged when their total size exceeds the maximum disk space allocated, which invalidates the slot. One way to resolve this would be to Increase WAL Retention: • Adjust the
wal_keep_size
parameter in PostgreSQL to allocate more disk space for WAL files