<@U04S8PLJWMT> What can I do to address "Failure i...
# replication-ask-ai
g
@kapa.ai What can I do to address "Failure in source: You've changed replication modes - please reset the streams in this connector" in a postgresql to snowflake connector? We've changed to WAL CDC from standard, if that helps.
k
Addressing "You've changed replication modes - please reset the streams" This error occurs because your connection has existing state from the previous Standard replication mode (stream-type state), and the new CDC/WAL mode expects a different state format (global-type state). The connector hard-rejects the mismatched state type. [StateManagerFactory] Here are your options, from simplest to most involved: Option 1: Reset all streams (recommended first step) In the Airbyte UI, perform a "Clear data" / full reset on the connection. This will delete the destination data for affected streams and re-sync from scratch. > ⚠️ Known limitation on Airbyte Cloud (source-postgres ≥ 3.8.0): Clear/reset jobs may blank the state row instead of deleting it, leaving a
{}
stream state that still causes the same error. If this happens, proceed to Option 2 or 3. [GitHub Issue] Option 2: Overwrite the state directly via API If the reset doesn't fully clear the state, you can overwrite it manually using the internal API:
Copy code
POST /api/v1/state/create_or_update
{
  "connectionId": "<your-connection-id>",
  "connectionState": {
    "stateType": "global",
    "connectionId": "<your-connection-id>",
    "globalState": { "shared_state": {}, "streamStates": [] }
  }
}
This empties the offset and forces the next sync to re-snapshot. [GitHub Issue] > ⚠️ Note: On Airbyte Cloud, this endpoint may return a 403 for API application tokens, and the public API exposes no state mutation. [GitHub Issue] Option 3: Delete and recreate the connection If neither of the above works (especially on Airbyte Cloud), deleting and recreating the connection is the most reliable workaround, since state is keyed to the connection ID. The first sync after recreation will perform the initial CDC snapshot successfully. [GitHub Issue] After resolving the state issue Once CDC is running, make sure to configure it properly to avoid future failures: • Set up a Debezium heartbeat query to prevent WAL disk consumption issues on low-traffic databases. [Postgres Troubleshooting] • Tune
wal_keep_size
(PG 13+) to retain enough WAL history between syncs. [Postgres Troubleshooting] • Run syncs frequently enough to keep the replication slot current. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.