You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: airbyte-integrations/connectors/source-postgres/src/main/java/io/airbyte/integrations/source/postgres/cdc/PostgresCdcCtidInitializer.java
"Saved offset is before replication slot's confirmed lsn. Please reset the connection, and then increase WAL retention or reduce sync frequency to prevent this from happening in the future. See https://docs.airbyte.com/integrations/sources/postgres/postgres-troubleshooting#under-cdc-incremental-mode-there-are-still-full-refresh-syncs for more details.");
121
+
}
115
122
LOGGER.warn("Saved offset is before Replication slot's confirmed_flush_lsn, Airbyte will trigger sync from scratch");
Copy file name to clipboardexpand all lines: airbyte-integrations/connectors/source-postgres/src/main/resources/spec.json
+8
Original file line number
Diff line number
Diff line change
@@ -296,6 +296,14 @@
296
296
"description": "Specifies a query that the connector executes on the source database when the connector sends a heartbeat message. Please see the <a href=\"https://docs.airbyte.com/integrations/sources/postgres/postgres-wal-disk-consumption-and-heartbeat-action-query\">setup guide</a> for how and when to configure this setting.",
297
297
"default": "",
298
298
"order": 8
299
+
},
300
+
"invalid_cdc_cursor_position_behavior": {
301
+
"type": "string",
302
+
"title": "Invalid CDC position behavior (Advanced)",
303
+
"description": "Determines whether Airbyte should fail or re-sync data in case of an stale/invalid cursor value into the WAL. If 'Fail sync' is chosen, a user will have to manually reset the connection before being able to continue syncing data. If 'Re-sync data' is chosen, Airbyte will automatically trigger a refresh but could lead to higher cloud costs and data loss.",
Copy file name to clipboardexpand all lines: airbyte-integrations/connectors/source-postgres/src/test-integration/resources/expected_cloud_deployment_spec.json
+8
Original file line number
Diff line number
Diff line change
@@ -297,6 +297,14 @@
297
297
"description": "Specifies a query that the connector executes on the source database when the connector sends a heartbeat message. Please see the <a href=\"https://docs.airbyte.com/integrations/sources/postgres/postgres-wal-disk-consumption-and-heartbeat-action-query\">setup guide</a> for how and when to configure this setting.",
298
298
"default": "",
299
299
"order": 8
300
+
},
301
+
"invalid_cdc_cursor_position_behavior": {
302
+
"type": "string",
303
+
"title": "Invalid CDC position behavior (Advanced)",
304
+
"description": "Determines whether Airbyte should fail or re-sync data in case of an stale/invalid cursor value into the WAL. If 'Fail sync' is chosen, a user will have to manually reset the connection before being able to continue syncing data. If 'Re-sync data' is chosen, Airbyte will automatically trigger a refresh but could lead to higher cloud costs and data loss.",
Copy file name to clipboardexpand all lines: airbyte-integrations/connectors/source-postgres/src/test-integration/resources/expected_spec.json
+8
Original file line number
Diff line number
Diff line change
@@ -296,6 +296,14 @@
296
296
"description": "Specifies a query that the connector executes on the source database when the connector sends a heartbeat message. Please see the <a href=\"https://docs.airbyte.com/integrations/sources/postgres/postgres-wal-disk-consumption-and-heartbeat-action-query\">setup guide</a> for how and when to configure this setting.",
297
297
"default": "",
298
298
"order": 8
299
+
},
300
+
"invalid_cdc_cursor_position_behavior": {
301
+
"type": "string",
302
+
"title": "Invalid CDC position behavior (Advanced)",
303
+
"description": "Determines whether Airbyte should fail or re-sync data in case of an stale/invalid cursor value into the WAL. If 'Fail sync' is chosen, a user will have to manually reset the connection before being able to continue syncing data. If 'Re-sync data' is chosen, Airbyte will automatically trigger a refresh but could lead to higher cloud costs and data loss.",
Copy file name to clipboardexpand all lines: airbyte-integrations/connectors/source-postgres/src/test/java/io/airbyte/integrations/source/postgres/CdcPostgresSourceTest.java
Copy file name to clipboardexpand all lines: airbyte-integrations/connectors/source-postgres/src/testFixtures/java/io/airbyte/integrations/source/postgres/PostgresTestDatabase.java
| 3.3.11 | 2024-02-20 |[35304](https://github.com/airbytehq/airbyte/pull/35304)| Add config to throw an error on invalid CDC position and enable it by default. |
Copy file name to clipboardexpand all lines: docs/integrations/sources/postgres/postgres-troubleshooting.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ Normally under the CDC mode, the Postgres source will first run a full refresh s
78
78
The root causes is that the WALs needed for the incremental sync has been removed by Postgres. This can occur under the following scenarios:
79
79
80
80
- When there are lots of database updates resulting in more WAL files than allowed in the `pg_wal` directory, Postgres will purge or archive the WAL files. This scenario is preventable. Possible solutions include:
81
-
- Sync the data source more frequently. The downside is that more computation resources will be consumed, leading to a higher Airbyte bill.
81
+
- Sync the data source more frequently.
82
82
- Set a higher `wal_keep_size`. If no unit is provided, it is in megabytes, and the default is `0`. See detailed documentation [here](https://www.postgresql.org/docs/current/runtime-config-replication.html#GUC-WAL-KEEP-SIZE). The downside of this approach is that more disk space will be needed.
83
83
- When the Postgres connector successfully reads the WAL and acknowledges it to Postgres, but the destination connector fails to consume the data, the Postgres connector will try to read the same WAL again, which may have been removed by Postgres, since the WAL record is already acknowledged. This scenario is rare, because it can happen, and currently there is no way to prevent it. The correct behavior is to perform a full refresh.
0 commit comments