{"record":{"id":"03bd505d1d3ed702","repo":"apache/seatunnel","slug":"no-replication-slot-found","errorCode":null,"errorMessage":"No replication slot found","messagePattern":"No replication slot found","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/PostgresReplicationConnection.java","lineNumber":503,"sourceCode":"        }\n        return Optional.ofNullable(slotCreationInfo);\n    }\n\n    protected BaseConnection pgConnection() throws SQLException {\n        return (BaseConnection) connection(false);\n    }\n\n    private SlotCreationResult parseSlotCreation(ResultSet rs) {\n        try {\n            if (rs.next()) {\n                String slotName = rs.getString(\"slot_name\");\n                String startPoint = rs.getString(\"consistent_point\");\n                String snapName = rs.getString(\"snapshot_name\");\n                String pluginName = rs.getString(\"output_plugin\");\n\n                return new SlotCreationResult(slotName, startPoint, snapName, pluginName);\n            } else {\n                throw new ConnectException(\"No replication slot found\");\n            }\n        } catch (SQLException ex) {\n            throw new ConnectException(\"Unable to parse create_replication_slot response\", ex);\n        }\n    }\n\n    private ReplicationStream createReplicationStream(\n            final Lsn startLsn, WalPositionLocator walPosition)\n            throws SQLException, InterruptedException {\n        PGReplicationStream s;\n\n        try {\n            try {\n                s =\n                        startPgReplicationStream(\n                                startLsn,\n                                plugin.forceRds()\n                                        ? messageDecoder::optionsWithoutMetadata","sourceCodeStart":485,"sourceCodeEnd":521,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-opengauss/src/main/java/io/debezium/connector/postgresql/connection/PostgresReplicationConnection.java#L485-L521","documentation":"Thrown by parseSlotCreation when the response of CREATE_REPLICATION_SLOT ... LOGICAL ... contains no row. A successful slot creation must return one row with consistent_point, snapshot_name and output_plugin; an empty result means the server did not create/return a slot, so no SlotCreationResult can be built. Wrapped in a ConnectException.","triggerScenarios":"Executing CREATE_REPLICATION_SLOT <name> LOGICAL <plugin> on the replication connection returns a result set with zero rows: the server refused or no-op'd the creation (e.g. slot already existed and creation failed silently, unsupported command variant, or the connection is not in replication mode).","commonSituations":"Slot already exists from a previous run (server errors instead of returning a row on some versions); openGauss/Postgres fork divergences in CREATE_REPLICATION_SLOT syntax (e.g. missing EXPORT_SNAPSHOT support); replication connection not properly established so the command is not recognized as a replication command.","solutions":["Check pg_replication_slots: if the slot already exists, either delete it (SELECT pg_drop_replication_slot('<name>')) or configure the connector to reuse the existing slot instead of creating one.","Confirm the output plugin configured (e.g. pgoutput, wal2json, decoderbufs) is installed on the server (pg_available_extensions / shared_preload or contrib installed).","Verify the replication connection works (IDENTIFY_SYSTEM returns a row) — see error 521 — since the slot-create command requires a true replication connection.","Check the server log for the underlying CREATE_REPLICATION_SLOT error; version mismatches between the connector's command syntax and the server may need a connector upgrade.","Use a unique slot.name for this connector instance to avoid collisions with other deployments."],"exampleFix":"// before: slot left over from previous failed run\nSELECT * FROM pg_drop_replication_slot('dbz_slot');\n// after: slot removed; connector can create it fresh on restart\nSELECT pg_drop_replication_slot('dbz_slot'); -- returns true, restart connector","handlingStrategy":"try-catch","validationCode":"-- verify no conflicting slot and plugin availability before creating\nSELECT slot_name, plugin FROM pg_replication_slots WHERE slot_name = 'my_slot';\nSELECT * FROM pg_available_extensions WHERE name IN ('pgoutput','wal2json','decoderbufs');","typeGuard":null,"tryCatchPattern":"try {\n    connection.initReplicationSlot();\n} catch (ConnectException e) {\n    if (\"No replication slot found\".equals(e.getMessage())) {\n        // drop stale slot or reuse existing one, verify output plugin, retry\n    } else {\n        throw e;\n    }\n}","preventionTips":["Drop stale slots from crashed/removed connectors before starting a new one with the same slot.name.","Confirm the configured output plugin is installed on the server.","Verify a true replication connection first (IDENTIFY_SYSTEM works) before slot creation.","Match connector version to server (openGauss/Postgres) version."],"tags":["postgresql","cdc","replication-slot","sql"],"backgroundTag":"empty-result-set","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}