{"record":{"id":"9b8a16e424762416","repo":"apache/seatunnel","slug":"could-not-register-for-streaming-with-metadata-in","errorCode":null,"errorMessage":"Could not register for streaming with metadata in messages, falling back to messages without metadata","messagePattern":"Could not register for streaming with metadata in messages, falling back to messages without metadata","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-opengauss/src/main/java/io/debezium/connector/postgresql/connection/PostgresReplicationConnection.java","lineNumber":545,"sourceCode":"\n                // re-init the slot after a failed start of slot, as this\n                // may have closed the slot\n                if (useTemporarySlot()) {\n                    initReplicationSlot();\n                }\n\n                s =\n                        startPgReplicationStream(\n                                startLsn,\n                                plugin.forceRds()\n                                        ? messageDecoder::optionsWithoutMetadata\n                                        : messageDecoder::optionsWithMetadata);\n                messageDecoder.setContainsMetadata(plugin.forceRds() ? false : true);\n            }\n        } catch (PSQLException e) {\n            if (e.getMessage().matches(\"(?s)ERROR: option .* is unknown.*\")) {\n                // It is possible we are connecting to an old wal2json plug-in\n                LOGGER.warn(\n                        \"Could not register for streaming with metadata in messages, falling back to messages without metadata\");\n\n                // re-init the slot after a failed start of slot, as this\n                // may have closed the slot\n                if (useTemporarySlot()) {\n                    initReplicationSlot();\n                }\n\n                s = startPgReplicationStream(startLsn, messageDecoder::optionsWithoutMetadata);\n                messageDecoder.setContainsMetadata(false);\n            } else if (e.getMessage()\n                    .matches(\"(?s)ERROR: requested WAL segment .* has already been removed.*\")) {\n                LOGGER.error(\"Cannot rewind to last processed WAL position\", e);\n                throw new ConnectException(\n                        \"The offset to start reading from has been removed from the database write-ahead log. Create a new snapshot and consider setting of PostgreSQL parameter wal_keep_segments = 0.\");\n            } else {\n                throw e;\n            }","sourceCodeStart":527,"sourceCodeEnd":563,"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#L527-L563","documentation":"createReplicationStream first tries to start streaming with metadata options (e.g. wal2json include-types style metadata or pgoutput messages with metadata). If PostgreSQL rejects an unknown option (old wal2json plugin), it logs this warning and falls back to streaming without metadata, re-initializing a temporary slot if needed.","triggerScenarios":"START_REPLICATION with messageDecoder.optionsWithMetadata raises PSQLException matching 'ERROR: option .* is unknown' — server has an older wal2json or a plugin not supporting the requested option.","commonSituations":"Old wal2json versions lacking format-version/include options; RDS-managed Postgres with restricted plugins; switching plugin types (wal2json vs pgoutput) without updating connector config.","solutions":["Upgrade the wal2json extension on the server to a version supporting the requested options.","Explicitly set the expected plugin/config (plugin.name=pgoutput with publication) to avoid legacy wal2json paths.","Ignore safely: the connector auto-falls back; verify downstream decode still works with metadata-less messages.","If on RDS, confirm the supported plugin version and options for your engine version."],"exampleFix":"// before\n{\"plugin.name\": \"wal2json\", \"slot.stream.params\": \"include-types=true\"} // old wal2json\n// after\n// upgrade wal2json, or:\n// {\"plugin.name\": \"pgoutput\", \"publication.name\": \"dbz_publication\"}","handlingStrategy":"fallback","validationCode":"SELECT extversion FROM pg_extension WHERE extname='wal2json'; -- require recent version, or use pgoutput","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install latest wal2json or prefer pgoutput with a publication.","Match plugin.name config to the actually installed plugin.","Test option support with a START_REPLICATION probe on staging."],"tags":["cdc","postgresql","wal2json","fallback"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}