{"record":{"id":"2a8e6d08c69a1250","repo":"apache/seatunnel","slug":"table-tableid-does-not-have-a-full-replica-iden","errorCode":null,"errorMessage":"Table ${tableId} does not have a full replica identity, please execute: ALTER TABLE ${tableId} REPLICA IDENTITY FULL;","messagePattern":"Table (.+?) does not have a full replica identity, please execute: ALTER TABLE (.+?) REPLICA IDENTITY FULL;","errorType":"exception","errorClass":"SeaTunnelException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-postgres/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/postgres/source/PostgresDialect.java","lineNumber":135,"sourceCode":"                    TableDiscoveryUtils.listTables(\n                            jdbcConnection, postgresSourceConfig.getTableFilters());\n            this.checkAllTablesEnabledCapture(jdbcConnection, tables);\n            return tables;\n        } catch (SQLException e) {\n            throw new SeaTunnelException(\"Error to discover tables: \" + e.getMessage(), e);\n        }\n    }\n\n    @Override\n    public void checkAllTablesEnabledCapture(JdbcConnection jdbcConnection, List<TableId> tableIds)\n            throws SQLException {\n        PostgresConnection postgresConnection = (PostgresConnection) jdbcConnection;\n        for (TableId tableId : tableIds) {\n            ServerInfo.ReplicaIdentity replicaIdentity =\n                    postgresConnection.readReplicaIdentityInfo(tableId);\n            if (requireReplicaIdentityFull\n                    && !ServerInfo.ReplicaIdentity.FULL.equals(replicaIdentity)) {\n                throw new SeaTunnelException(\n                        String.format(\n                                \"Table %s does not have a full replica identity, please execute: ALTER TABLE %s REPLICA IDENTITY FULL;\",\n                                tableId, tableId));\n            }\n        }\n    }\n\n    @Override\n    public TableChanges.TableChange queryTableSchema(JdbcConnection jdbc, TableId tableId) {\n        if (postgresSchema == null) {\n            postgresSchema = new PostgresSchema(sourceConfig.getDbzConnectorConfig(), tableMap);\n        }\n        return postgresSchema.getTableSchema(jdbc, tableId);\n    }\n\n    @Override\n    public PostgresSourceFetchTaskContext createFetchTaskContext(\n            SourceSplitBase sourceSplitBase, JdbcSourceConfig taskSourceConfig) {","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-postgres/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/postgres/source/PostgresDialect.java#L117-L153","documentation":"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.","triggerScenarios":"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.","commonSituations":"Freshly created tables default to replica identity DEFAULT; incremental snapshot needs full row images; team forgot the ALTER step in a new environment.","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)."],"exampleFix":"// before\n-- replica identity DEFAULT (pk only)\n// after\nALTER TABLE public.orders REPLICA IDENTITY FULL;","handlingStrategy":"validation","validationCode":"psql \"postgres://user@host:5432/mydb\" -c \"SELECT relname, relreplident FROM pg_class WHERE relname IN ('orders');\" -- relreplident must be 'f'","typeGuard":null,"tryCatchPattern":"try {\n  startCdcSource(cfg);\n} catch (SeaTunnelException e) {\n  if (e.getMessage().contains(\"full replica identity\")) {\n    // run ALTER TABLE ... REPLICA IDENTITY FULL for the named table, then retry\n  }\n}","preventionTips":["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."],"tags":["postgres","cdc","replica-identity","config"],"backgroundTag":"invalid-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}