-
Feature Request
-
Resolution: Unresolved
-
Major
-
None
-
None
-
False
-
None
-
False
Even with the upsert insert mode with Postgres, when a PK changes, we end with two lines in the database.
Instead of using INSERT INTO ON CONFLICT, we can use MERGE INTO which is fully supported in recent PG Versions.
Requirement to use MERGE INTO
- Recent PG version
- Old the fields used in the key must be present in the record value to extract the old key from the before field
- Not compatible with flat records
Work in progress in this branch: https://github.com/debezium/debezium-connector-jdbc/compare/main...bpaquet:debezium-connector-jdbc:merge_into