Details
-
Feature Request
-
Resolution: Unresolved
-
Major
-
None
-
0.9.0.Alpha2
-
None
-
0
-
0%
Description
When upgrading between major Postgres versions, basically three options exist:
- pg_dump and restore, with large downtime
- pg_upgrade, with smaller downtime
- stream all data through logical replication to the new version, potentially HA
However, all three of these lose logical replication slots and thus the marker that postgresql-connector uses to track its progress.
As far as I can tell, the most reliable way to upgrade would be:
- Start downtime - disconnect all Pg clients and let DBZ catch up with all changes.
- Delete DBZ connector
- Do any of the Pg upgrade options
- Create a logical replication slot
- Recreate the same DBZ connector, minus the initial data dumb
Optionally, this could be also be a feature request? The lowest user effort would be for DBZ to detect that the Pg version has changed, and just accept that replication slot WAL position has been reset, and then continue streaming changes as before. Maybe an easier compromise would be to manually send some "Reset WAL position" command to the connector.