<@U04SE163WC8> For a Postgresql to Snowflake conne...
# ask-ai
g
@kapa.ai For a Postgresql to Snowflake connector where the source is set up to use WAL CDC, the initial sync is failing with the message "Saved offset is before replication slot's confirmed lsn." What can I do to fix this?
u
This error typically occurs when the Write-Ahead Log (WAL) in PostgreSQL is purged before Airbyte has a chance to process it. Here are a few steps you can take to resolve this issue: 1. Reset the connection: This can be done from the Airbyte UI. You can find instructions on how to do this [here](https://www.restack.io/docs/airbyte-knowledge-airbyte-data-reset-guide#:~:text=Steps%20to%20Reset%20Your%20Data). 2. Increase WAL retention: You can increase the WAL retention in your PostgreSQL settings. This can be done by increasing the values of
wal_keep_size
and
max_slot_wal_keep_size
. Here's an example of how you can do this:
Copy code
sql     ALTER SYSTEM SET wal_keep_size = '10GB';     ALTER SYSTEM SET max_slot_wal_keep_size = '10GB';
3. Increase sync frequency: If your sync jobs are too far apart, the WAL might be purged before Airbyte has a chance to process it. Try running your sync jobs more frequently. 4. Extend the auto-cancellation timeout: If your sync jobs are taking too long and getting cancelled before they can finish, try extending the auto-cancellation timeout. 5. Recreate the connection: If you're switching from a different PostgreSQL plugin, you might need to recreate the connection in Airbyte. Remember to apply these changes and then try to sync again. If the problem persists, you might want to consider reaching out to the Airbyte community for further assistance. Sources: [Github Issue](https://github.com/airbytehq/airbyte/issues/46571), [Forum Post](https://discuss.airbyte.io/t/2675), [Github Discussion](https://github.com/airbytehq/airbyte/discussions/45096)