estuary / connectors

Connectors for capturing data from external data sources
Other
48 stars 13 forks source link

source-postgres: Check for slot delete/recreate and error out #1653

Closed willdonnelly closed 3 months ago

willdonnelly commented 3 months ago

Description:

This PR fixes the behavior of source-postgres when the replication slot is deleted and then recreated, so that it will error out until the user re-backfills all bindings (the intended behavior) instead of just silently skipping an unknown amount of change data and then continuing where it left off (the behavior prior to today).

While I was at it I also threw in a change I've been meaning to get around to, which makes the automated diagnostics queries run once at capture startup. This is a good idea in general because it gives us more debugging information in certain cases where tasks are consistently failing before they reach the replication diagnostics timeout, and I went ahead and did it as part of this work because the extra logging made it easier to verify exactly what was going on with the Postgres replication slot management.


This change is Reviewable