priyanka chawla
priyanka chawla

Reputation: 11

Debezium Postgres Connector Error Getting before data as always null for DELETE/ UPDATE operation

While using the Debezium Postgres connector for capturing the change data on Aurora Postgres, we saw for all the INSERT operations we are getting the captured data correctly. But for the UPDATE operation, we are seeing that we do not have any before/old data just the getting the after/new data. Also for DELETE operation, we are getting the primary key value filled in just, and the rest of the fields are set to null.

Our configuration for debezium connector in apache camel is as below:

String uri = "debezium-postgres:dbz-test-1?" +
"databaseHostName=" + host +
"&databaseUser=" + username +
"&databasePassword=" + password +
"&databasePort=" + port +
"&databaseDbname=" + dbName +
"&slotName=" + dbName +
"&databaseSslMode=require" +
"&databaseServerName=my-server1" +
"&offsetStorageFileName=offset-file-1.dat" +
"&snapshotMode=initial" +
"&pluginName=pgoutput" +
"&eventProcessingFailureHandlingMode=warn" +
"&tombstonesOnDelete=false" +
"&databaseHistoryFileFilename=history-file-1.dat";

2 things that we basically tried:

  1. Setting the tombstonesOnDelete to false explicitly... but it did not help much.
  2. Set the REPLICA_IDENTITY for a specific table to value FULL. But after setting this value, the UPDATES are leading to replication status getting set to down. Basically, the PG logical replication goes down.

Could anyone please help? My requirement is to get all of the before/old data during UPDATE and DELETE operation.

Upvotes: 1

Views: 1265

Answers (1)

sravan
sravan

Reputation: 439

did you win on this. If yeah, what was the fix please.

edit: fix is run the alter command on the postgres table. alter table tablename replica full

Upvotes: 2

Related Questions