would it possible to support drop a slot on connection close for Postgresql connector? #2065
Unanswered
TDtianzhenjiu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
the debezium supports this property
slot.drop.on.stop
to support the drop slot after the app has been killed.but it actually depends on the approach of how to kill the app. and most of the time it does not work.
since Postgresql supports creating temporary slots, once the session has been closed it will drop the slot automatically.
on the debezium side, however, it always returns false to indicate to create persist slot.
here is the code snippet
https://github.com/debezium/debezium/blob/DBZ-3414-fix-link-formatting-in-downstream-auto-topic-creation-doc/debezium-connector-postgres/src/main/java/io/debezium/connector/postgresql/connection/PostgresReplicationConnection.java#L261
the official answer to this reason is that temporary replication slots cannot be used due to connection restart.
in the flink job, however, if the connection restarts we can throw an exception to let the job restart
although the slot has been dropped, after restarting, the flink CDC job can redo the snapshot, right?
So, IMO, in the fink CDC job, it is safe to create a temporary slot, am I right?
Beta Was this translation helpful? Give feedback.
All reactions