{"record":{"id":"e29497a80c6e11b8","repo":"apache/seatunnel","slug":"value-column-in-the-pg-replication-slots-table-f","errorCode":null,"errorMessage":"Value <column> in the pg_replication_slots table for slot = '<slotName>', plugin = '<pluginName>', database = '<database>' is not valid. This is an abnormal situation and the database status should be checked.","messagePattern":"Value <column> in the pg_replication_slots table for slot = '<slotName>', plugin = '<pluginName>', database = '<database>' is not valid\\. This is an abnormal situation and the database status should be checked\\.","errorType":"exception","errorClass":"ConnectException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-opengauss/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java","lineNumber":421,"sourceCode":"            throw new ConnectException(\"restart_lsn could be found\");\n        }\n\n        return restartLsn;\n    }\n\n    private Lsn tryParseLsn(\n            String slotName, String pluginName, String database, ResultSet rs, String column)\n            throws ConnectException, SQLException {\n        Lsn lsn = null;\n\n        String lsnStr = rs.getString(column);\n        if (lsnStr == null) {\n            return null;\n        }\n        try {\n            lsn = Lsn.valueOf(lsnStr);\n        } catch (Exception e) {\n            throw new ConnectException(\n                    \"Value \"\n                            + column\n                            + \" in the pg_replication_slots table for slot = '\"\n                            + slotName\n                            + \"', plugin = '\"\n                            + pluginName\n                            + \"', database = '\"\n                            + database\n                            + \"' is not valid. This is an abnormal situation and the database status should be checked.\");\n        }\n        if (!lsn.isValid()) {\n            throw new ConnectException(\"Invalid LSN returned from database\");\n        }\n        return lsn;\n    }\n\n    /**\n     * Drops a replication slot that was created on the DB","sourceCodeStart":403,"sourceCodeEnd":439,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-opengauss/src/main/java/io/debezium/connector/postgresql/connection/PostgresConnection.java#L403-L439","documentation":"tryParseLsn converts the string value of a column (confirmed_flush_lsn or restart_lsn) from pg_replication_slots into a Debezium Lsn via Lsn.valueOf. If the string cannot be parsed, it throws this ConnectException indicating the slot row holds a corrupt/unsupported LSN value and the database state should be inspected.","triggerScenarios":"Lsn.valueOf(lsnStr) throws for the value of the given column for slot '<slotName>', plugin '<pluginName>', database '<database>' — e.g. an empty/placeholder value, a format produced by an OpenGauss fork that differs from PostgreSQL's XXX/XXXXXXX hex LSN format.","commonSituations":"Using the opengauss CDC connector against a server whose pg_replication_slots LSN rendering differs from vanilla PostgreSQL; corrupted catalog entries after a crash; manually tampered slot metadata.","solutions":["Inspect the raw value: SELECT slot_name, plugin, database, confirmed_flush_lsn, restart_lsn FROM pg_replication_slots WHERE slot_name = '<slot>';","Drop and recreate the corrupted slot: SELECT pg_drop_replication_slot('<slot>'); then pg_create_logical_replication_slot(...).","Verify the connector variant matches the database flavor (use the OpenGauss-appropriate Debezium connector, not vanilla Postgres, if LSN formats differ).","Check database logs for catalog corruption and consider a restart of the database instance."],"exampleFix":"-- before: corrupted slot value aborts startup\nSELECT slot_name, restart_lsn FROM pg_replication_slots; -- shows invalid value\n-- after: recreate the slot\nSELECT pg_drop_replication_slot('seatunnel_slot');\nSELECT pg_create_logical_replication_slot('seatunnel_slot', 'pgoutput');","handlingStrategy":"validation","validationCode":"SELECT confirmed_flush_lsn, restart_lsn FROM pg_replication_slots WHERE slot_name = 'slot'; -- values must match PostgreSQL LSN format, e.g. 0/1A2B3C4","typeGuard":null,"tryCatchPattern":"try {\n    connection.getReplicationSlotState(slotName, pluginName);\n} catch (ConnectException e) {\n    // drop and recreate the slot, then restart the connector\n}","preventionTips":["Use the connector variant that matches the database flavor (OpenGauss vs PostgreSQL).","Check slot LSNs after any database crash before restarting connectors.","Avoid manual edits to replication slot catalog entries."],"tags":["cdc","postgres","lsn","corrupt-data"],"backgroundTag":"invalid-argument-format","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"}