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

Views in database stop PostgreSQL connector

    Details

      Description

      When target database contains view, PostgreSQL connector stop working with following error.

      [2017-08-04 07:04:32,357] ERROR Task mydebezium-0 threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask)
      org.apache.kafka.connect.errors.ConnectException: java.util.concurrent.CompletionException: org.apache.kafka.connect.errors.ConnectException: org.postgresql.util.PSQLException: ERROR: "myview1" is not a table
       at io.debezium.connector.postgresql.PostgresConnectorTask.poll(PostgresConnectorTask.java:165)
       at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:162)
       at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:139)
       at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:182)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       at java.lang.Thread.run(Thread.java:745)
      Caused by: java.util.concurrent.CompletionException: org.apache.kafka.connect.errors.ConnectException: org.postgresql.util.PSQLException: ERROR: "myview1" is not a table
       at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
       at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
       at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1629)
       ... 3 more
      Caused by: org.apache.kafka.connect.errors.ConnectException: org.postgresql.util.PSQLException: ERROR: "myview1" is not a table
       at io.debezium.connector.postgresql.RecordsSnapshotProducer.takeSnapshot(RecordsSnapshotProducer.java:220)
       at io.debezium.connector.postgresql.RecordsSnapshotProducer.lambda$start$1(RecordsSnapshotProducer.java:76)
       at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
       ... 3 more
      Caused by: org.postgresql.util.PSQLException: ERROR: "myview1" is not a table
       at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2412)
       at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2125)
       at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:297)
       at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428)
       at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354)
       at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:301)
       at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:287)
       at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:264)
       at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:260)
       at io.debezium.connector.postgresql.connection.PostgresConnection.executeWithoutCommitting(PostgresConnection.java:71)
       at io.debezium.connector.postgresql.RecordsSnapshotProducer.takeSnapshot(RecordsSnapshotProducer.java:156)
       ... 5 more
      [2017-08-04 07:04:32,357] ERROR Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask)
      

      Although it is possible to avoid this error by specifying view names in blacklist, I think that it is preferable to filter out views automatically.

      I originally reported this issue to https://groups.google.com/forum/#!topic/debezium/faoPdbSbHIc .

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jpechanec Jiri Pechanec
                Reporter:
                t_hozumi Takahiro Hozumi
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: