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

Postgres connector fails with quoted type names

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 0.5.2
    • 0.5.1
    • postgresql-connector
    • None
    • Hide

      1. Create a table with a quoted name (making it case sensitive in Postgres), e.g.:
      create table "Role"
      (
      a_column bigint
      );

      2. start the Debezium connector

      Show
      1. Create a table with a quoted name (making it case sensitive in Postgres), e.g.: create table "Role" ( a_column bigint ); 2. start the Debezium connector

    Description

      If I have a quoted table name in Postgres then Debezium fails with unexpected exception. Observe that in the stack trace below public.Role has been changed to public.role

      2017-07-11 23:48:35,271 ERROR  Postgres|localhost|records-snapshot-producer  unexpected exception   [io.debezium.connector.postgresql.RecordsSnapshotProducer]
      org.apache.kafka.connect.errors.ConnectException: org.postgresql.util.PSQLException: ERROR: relation "public.role" does not exist
      	at io.debezium.connector.postgresql.RecordsSnapshotProducer.takeSnapshot(RecordsSnapshotProducer.java:218)
      	at io.debezium.connector.postgresql.RecordsSnapshotProducer.lambda$start$1(RecordsSnapshotProducer.java:74)
      	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
      	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: org.postgresql.util.PSQLException: ERROR: relation "public.role" does not exist
      	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:69)
      	at io.debezium.connector.postgresql.RecordsSnapshotProducer.takeSnapshot(RecordsSnapshotProducer.java:154)
      	... 5 more
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            jarym Em Em (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: