I tried putting xmin in the "column.include.list" but it didn't work, next I wrote a custom snapshotter that includes this:
@Override
public Optional<String> buildSnapshotQuery(TableId tableId, List<String> snapshotSelectColumns) {
String query = snapshotSelectColumns.stream()
.collect(Collectors.joining(", ", "SELECT xmin,", " FROM " + tableId.toDoubleQuotedString()));
return Optional.of(query);
}
When I started the connector I got a message like this:
java.lang.IllegalArgumentException: Column 'xmin' not found in result set 'xmin, id, createdAt, updatedAt, placeCategoryTypeName, ...'
This was followed by a list of all the columns in the table omitting the xmin "system column". So it seems that the xmin system column is fetched from PG (because it is part of the result set) but then it is cross-referenced against the non-system column names and this is what causes the error.
Is there any way I can get the xmin value included for the snapshot messages?