apache/seatunnel · error · SeaTunnelException
Table ${tableId} does not have a full replica identity, plea
Error message
Table ${tableId} does not have a full replica identity, please execute: ALTER TABLE ${tableId} REPLICA IDENTITY FULL; What it means
PostgresDialect.checkAllTablesEnabledCapture reads each table's REPLICA IDENTITY setting. When requireReplicaIdentityFull is set and a captured table is not FULL, it throws SeaTunnelException telling you to ALTER TABLE ... REPLICA IDENTITY FULL. Postgres logical decoding only emits full before/after images with FULL identity.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-postgres/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/postgres/source/PostgresDialect.java:135
TableDiscoveryUtils.listTables(
jdbcConnection, postgresSourceConfig.getTableFilters());
this.checkAllTablesEnabledCapture(jdbcConnection, tables);
return tables;
} catch (SQLException e) {
throw new SeaTunnelException("Error to discover tables: " + e.getMessage(), e);
}
}
@Override
public void checkAllTablesEnabledCapture(JdbcConnection jdbcConnection, List<TableId> tableIds)
throws SQLException {
PostgresConnection postgresConnection = (PostgresConnection) jdbcConnection;
for (TableId tableId : tableIds) {
ServerInfo.ReplicaIdentity replicaIdentity =
postgresConnection.readReplicaIdentityInfo(tableId);
if (requireReplicaIdentityFull
&& !ServerInfo.ReplicaIdentity.FULL.equals(replicaIdentity)) {
throw new SeaTunnelException(
String.format(
"Table %s does not have a full replica identity, please execute: ALTER TABLE %s REPLICA IDENTITY FULL;",
tableId, tableId));
}
}
}
@Override
public TableChanges.TableChange queryTableSchema(JdbcConnection jdbc, TableId tableId) {
if (postgresSchema == null) {
postgresSchema = new PostgresSchema(sourceConfig.getDbzConnectorConfig(), tableMap);
}
return postgresSchema.getTableSchema(jdbc, tableId);
}
@Override
public PostgresSourceFetchTaskContext createFetchTaskContext(
SourceSplitBase sourceSplitBase, JdbcSourceConfig taskSourceConfig) {View on GitHub (pinned to cf67b549a7)
Solutions
- Run ALTER TABLE <table> REPLICA IDENTITY FULL; for every reported table.
- Do this before starting the CDC job; re-run afterwards.
- If full images are truly not needed, disable the require-full-replica-identity option (risking incomplete update/delete images).
Example fix
// before -- replica identity DEFAULT (pk only) // after ALTER TABLE public.orders REPLICA IDENTITY FULL;
Defensive patterns
Strategy: validation
Validate before calling
psql "postgres://user@host:5432/mydb" -c "SELECT relname, relreplident FROM pg_class WHERE relname IN ('orders');" -- relreplident must be 'f' Try / catch
try {
startCdcSource(cfg);
} catch (SeaTunnelException e) {
if (e.getMessage().contains("full replica identity")) {
// run ALTER TABLE ... REPLICA IDENTITY FULL for the named table, then retry
}
} Prevention
- Add ALTER TABLE ... REPLICA IDENTITY FULL to table provisioning runbooks.
- Pre-check relreplident in CI before enabling CDC.
- Include the ALTER in migration scripts for new environments.
When it happens
Trigger: Thrown when a CDC job (with debezium.require-replica-identity-full or equivalent option enabled) discovers or creates a fetch task for a table whose replica identity is DEFAULT/NOTHING/INDEX.
Common situations: Freshly created tables default to replica identity DEFAULT; incremental snapshot needs full row images; team forgot the ALTER step in a new environment.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Publication autocreation is disabled, please create one and
- No table filters found for filtered publication %s
- Invalid table name: ${tableStr} ,Postgres identifier is of t
- PostgreSQL-CDC startup.mode 'COMMITTED_OFFSET' requires an e
- The "before" field of ${op} operation is null, if you are us
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/2a8e6d08c69a1250.
Report an issue: GitHub.