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

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

    XMLWordPrintable

Details

    Description

      The max oid for the pg database i am trying to connect to is 2,477,031,632 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:336)
          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:309)
          ... 5 more
      

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

      final int oid = rs.getInt("oid");
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: