Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-701

Debezium is throwing exception when max typelem in pg db is larger than max int

XMLWordPrintable

      The max typelem for the pg database i am trying to connect to is 2,477,042,231 which is larger than max int. When trying to connect to/read the database using Debezium, i get the following error :

      java.util.concurrent.ExecutionException: org.apache.kafka.connect.errors.ConnectException: Could not intialize type registry
      	at org.apache.kafka.connect.util.ConvertingFutureCallback.result(ConvertingFutureCallback.java:79)
      	at org.apache.kafka.connect.util.ConvertingFutureCallback.get(ConvertingFutureCallback.java:66)
      	at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:110)
      Caused by: org.apache.kafka.connect.errors.ConnectException: Could not intialize type registry
      	at io.debezium.connector.postgresql.connection.PostgresConnection.initTypeRegistry(PostgresConnection.java:338)
      	at io.debezium.connector.postgresql.connection.PostgresConnection.<init>(PostgresConnection.java:65)
      	at io.debezium.connector.postgresql.PostgresConnector.validate(PostgresConnector.java:95)
      	at org.apache.kafka.connect.runtime.AbstractHerder.validateConnectorConfig(AbstractHerder.java:277)
      	at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.putConnectorConfig(StandaloneHerder.java:164)
      	at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:107)
      Caused by: org.postgresql.util.PSQLException: Bad value for type int : 2221556978
      	at org.postgresql.jdbc.PgResultSet.toInt(PgResultSet.java:2824)
      	at org.postgresql.jdbc.PgResultSet.getInt(PgResultSet.java:2087)
      	at org.postgresql.jdbc.PgResultSet.getInt(PgResultSet.java:2501)
      	at io.debezium.connector.postgresql.connection.PostgresConnection.initTypeRegistry(PostgresConnection.java:331)
      	... 5 more
      

      Looking at :
      io.debezium.connector.postgresql.connection.PostgresConnection.initTypeRegistry(PostgresConnection.java:331) i see :

      typeRegistryBuilder.get(rs.getInt("element"))
      

            jpechane Jiri Pechanec
            dajerome David Jerome (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: