Postgres JDBC Sink Connector - Deletion issue

68 views
Skip to first unread message

Ontikonda Damodar

unread,
Feb 20, 2025, 5:03:59 AMFeb 20
to debezium
Hi Team, 

My CDC Pipeline: POSTGRES_SOURCE-->DEBEZIUM-->KAFKA-->POSTGRES_TARGET.

I have tried DML operations with below Source and Sink connectors, These are the results.

Create Table at source - it's creating in the target
Inserting Records - it's inserting the records
Update Records - it's updating the records
Delete Records - Not deleting the rows but adding an extra '__deleted' column in target and value 'true'. Initially it was 'false' for every table.
-But I am expecting a deletion of the row at the target when I delete at the source. Can you help me with this?

Source-Connector
===============
{

"name": "postgres-source-connector",

"config": {

"connector.class": "io.debezium.connector.postgresql.PostgresConnector",

"tasks.max": "1",

"database.hostname": "postgres_source",

"database.port": "5432",

"database.user": "postgres",

"database.password": "postgres",

"database.dbname": "sourcedb",

"database.server.name": "pgserver1",

"plugin.name": "pgoutput",

"slot.name": "debezium_slot",

"publication.name": "dbz_publication",

"table.include.list": ".*",

"tombstones.on.delete": "true",

"transforms": "unwrap",

"transforms.unwrap.type": "io.debezium.transforms.ExtractNewRecordState",

"transforms.unwrap.drop.tombstones": "true",

"transforms.unwrap.delete.handling.mode": "rewrite",

"include.schema.changes": "true",

"topic.prefix": "dbz"

}

}

Sink Connector
=============
{

"name": "postgres-sink-connector",

"config": {

"connector.class": "io.debezium.connector.jdbc.JdbcSinkConnector",

"tasks.max": "1",

"connection.url": "jdbc:postgresql://postgres_target:5432/targetdb",

"connection.username": "postgres",

"connection.password": "postgres",

"insert.mode": "upsert",

"primary.key.mode": "record_key",

"topics": "dbz.public.users",

"delete.enabled": "true",

"value.converter": "org.apache.kafka.connect.json.JsonConverter",

"value.converter.schemas.enable": "true",

"key.converter": "org.apache.kafka.connect.json.JsonConverter",

"key.converter.schemas.enable": "true",

"schema.evolution": "basic",

"use.time.zone": "UTC"

}

}

Thanks and Regards
Damodar

Chris Cranford

unread,
Feb 20, 2025, 5:05:15 AMFeb 20
to debe...@googlegroups.com
Hi -

As discussed on Zulip, this is a known issue, DBZ-8287 [1].

Thanks,
-cc

[1]: https://issues.redhat.com/browse/DBZ-8287
--
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/debezium/6c31f750-702b-40cb-a6e7-54adb1faac84n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages