Postgres Source Connector String index out of range: 7991

  • Is this your first time deploying Airbyte?: No
  • OS Version / Instance: Oracle Linux 8 Ec2 Instance
  • Memory / Disk: 32GB / 200GB
  • Deployment: Docker
  • Airbyte Version: 0.40.29
  • Source name/version: Postgres 1.0.36
  • Destination name/version: S3 0.3.18
  • Step: The issue is happening during sync
  • Description:
    Occasionally a specific connection will fail on all 3 attempts with the following error message;
2023-02-27 16:09:11 source > Searching for WAL resume position
2023-02-27 16:09:11 source > First LSN 'LSN{A96/F4050B40}' received
2023-02-27 16:09:11 source > Received COMMIT LSN 'LSN{A96/F4056390}' larger than than last stored commit LSN 'LSN{A96/F401C4C8}'
2023-02-27 16:09:11 source > Will restart from LSN 'LSN{A96/F4050B40}' that is start of the first unprocessed transaction
2023-02-27 16:09:11 source > WAL resume position 'LSN{A96/F4050B40}' discovered
2023-02-27 16:09:11 source > Connection gracefully closed
2023-02-27 16:09:11 source > Connection gracefully closed
2023-02-27 16:09:11 source > Initializing PgOutput logical decoder publication
2023-02-27 16:09:11 source > Requested thread factory for connector PostgresConnector, id = netherbrookprimarydudley_3322147 named = keep-alive
2023-02-27 16:09:11 source > Creating thread debezium-postgresconnector-netherbrookprimarydudley_3322147-keep-alive
2023-02-27 16:09:11 source > Processing messages
2023-02-27 16:09:11 source > Message with LSN 'LSN{A96/F4050B40}' arrived, switching off the filtering
2023-02-27 16:09:11 source > Cannot parse column default value '('now'::text)::date' to type 'date'. Expression evaluation is not supported.
2023-02-27 16:09:11 source > Cannot parse column default value '('now'::text)::date' to type 'date'. Expression evaluation is not supported.
2023-02-27 16:09:11 source > Producer failure
Stack Trace: org.apache.kafka.connect.errors.ConnectException: Error while processing event at offset {transaction_id=null, lsn_proc=11643524416312, lsn_commit=11643522260944, lsn=11643524416312, txId=38886366, ts_usec=1677510464664685}
        at io.debezium.pipeline.EventDispatcher.dispatchDataChangeEvent(
        at io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.lambda$processMessages$0(
        at io.debezium.connector.postgresql.connection.pgoutput.PgOutputMessageDecoder.decodeUpdate(
        at io.debezium.connector.postgresql.connection.pgoutput.PgOutputMessageDecoder.processNotEmptyMessage(
        at io.debezium.connector.postgresql.connection.AbstractMessageDecoder.processMessage(
        at io.debezium.connector.postgresql.connection.PostgresReplicationConnection$1.deserializeMessages(
        at io.debezium.connector.postgresql.connection.PostgresReplicationConnection$1.readPending(
        at io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.processMessages(
        at io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.execute(
        at io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.execute(
        at io.debezium.pipeline.ChangeEventSourceCoordinator.streamEvents(
        at io.debezium.pipeline.ChangeEventSourceCoordinator.executeChangeEventSources(
        at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(
        at java.base/java.util.concurrent.Executors$
        at java.base/
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.base/java.util.concurrent.ThreadPoolExecutor$
        at java.base/
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 7991
        at java.base/java.lang.StringLatin1.charAt(
        at java.base/java.lang.String.charAt(
        at io.debezium.util.Strings.hexStringToByteArray(
        at io.debezium.connector.postgresql.connection.pgoutput.PgOutputColumnValue.asByteArray(
        at io.debezium.connector.postgresql.connection.ReplicationMessageColumnValueResolver.resolveValue(
        at io.debezium.connector.postgresql.connection.pgoutput.PgOutputReplicationMessage.getValue(
        at io.debezium.connector.postgresql.connection.pgoutput.PgOutputMessageDecoder$1.getValue(
        at io.debezium.connector.postgresql.PostgresChangeRecordEmitter.columnValues(
        at io.debezium.connector.postgresql.PostgresChangeRecordEmitter.getNewColumnValues(
        at io.debezium.relational.RelationalChangeRecordEmitter.emitUpdateRecord(
        at io.debezium.relational.RelationalChangeRecordEmitter.emitChangeRecords(
        at io.debezium.connector.postgresql.PostgresChangeRecordEmitter.emitChangeRecords(
        at io.debezium.pipeline.EventDispatcher.dispatchDataChangeEvent(
        ... 17 more

2023-02-27 16:09:11 source > Connection gracefully closed
2023-02-27 16:09:11 source > Connection gracefully closed
2023-02-27 16:09:11 source > Finished streaming
2023-02-27 16:09:11 source > Connected metrics set to 'false'
2023-02-27 16:09:12 source > Stopping the task and engine
2023-02-27 16:09:12 source > Stopping down connector
2023-02-27 16:09:12 source > Stopped FileOffsetBackingStore
2023-02-27 16:09:12 source > Debezium engine shutdown.

I can resolve this issue by recreating the replication slot, however this requires manual intervention and another initial sync to be performed.

Hello there! You are receiving this message because none of your fellow community members has stepped in to respond to your topic post. (If you are a community member and you are reading this response, feel free to jump in if you have the answer!) As a result, the Community Assistance Team has been made aware of this topic and will be investigating and responding as quickly as possible.
Some important considerations that will help your to get your issue solved faster:

  • It is best to use our topic creation template; if you haven’t yet, we recommend posting a followup with the requested information. With that information the team will be able to more quickly search for similar issues with connectors and the platform and troubleshoot more quickly your specific question or problem.
  • Make sure to upload the complete log file; a common investigation roadblock is that sometimes the error for the issue happens well before the problem is surfaced to the user, and so having the tail of the log is less useful than having the whole log to scan through.
  • Be as descriptive and specific as possible; when investigating it is extremely valuable to know what steps were taken to encounter the issue, what version of connector / platform / Java / Python / docker / k8s was used, etc. The more context supplied, the quicker the investigation can start on your topic and the faster we can drive towards an answer.
  • We in the Community Assistance Team are glad you’ve made yourself part of our community, and we’ll do our best to answer your questions and resolve the problems as quickly as possible. Expect to hear from a specific team member as soon as possible.

Thank you for your time and attention.
The Community Assistance Team