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

Update Postgres documentation to use ts_ms instead of ts_usec

    XMLWordPrintable

Details

    • Hide

      Connector setup:

      
      curl -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d '
      {
      "name": "chbench-connector-basic115",
      "config": {
      "connector.class": "io.debezium.connector.postgresql.PostgresConnector",
      "tasks.max": "1",
      "database.hostname": "postgres2",
      "database.port": "5432",
      "database.user": "postgres",
      "database.password": "test",
      "database.dbname" : "dbname",
      "database.server.name": "dbservername",
      "database.whitelist": "dbname",
      "database.history.kafka.bootstrap.servers": "kafka:9092",
      "database.history.kafka.topic": "schema-changes.dbname",
      "poll.interval.ms":1
      }
      }'
      
      
      Show
      Connector setup: curl -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d ' { "name" : "chbench-connector-basic115" , "config" : { "connector.class" : "io.debezium.connector.postgresql.PostgresConnector" , "tasks.max" : "1" , "database.hostname" : "postgres2" , "database.port" : "5432" , "database.user" : "postgres" , "database.password" : "test" , "database.dbname" : "dbname" , "database.server.name" : "dbservername" , "database.whitelist" : "dbname" , "database.history.kafka.bootstrap.servers" : "kafka:9092" , "database.history.kafka.topic" : "schema-changes.dbname" , "poll.interval.ms" :1 } }'

    Description

      The field ts_usec is missing from the Kafka message received :

      {
          "schema": {
              "type": "struct",
              "fields": [...],
              "optional": false,
              "name": "dbserverchbenchbasic115.public.warehouse.Envelope"
          },
          "payload": {
              "before": {...},
              "after": {...},
              "source": {
                  "version": "0.10.0.Final",
                  "connector": "postgresql",
                  "name": "dbserverchbenchbasic115",
                  "ts_ms": 1573398526187,
                  "snapshot": "false",
                  "db": "chbench",
                  "schema": "public",
                  "table": "warehouse",
                  "txId": 615,
                  "lsn": 23464464,
                  "xmin": null
              },
              "op": "u",
              "ts_ms": 1573398526188
          }
      }
      

      Same in 1.0.0.Beta2:

      ....
      "source": {
      			"version": "1.0.0.Beta2",
      			"connector": "postgresql",
      			"name": "dbserverchbenchbasic115",
      			"ts_ms": 1573460042654,
      			"snapshot": "false",
      			"db": "chbench",
      			"schema": "public",
      			"table": "warehouse",
      			"txId": 626,
      			"lsn": 23481808,
      			"xmin": null
      		},
      		"op": "u",
      		"ts_ms": 1573460042686
      	}
      }
      

      Attachments

        Activity

          People

            jpechane Jiri Pechanec
            carlcamilleri@gmail.com Carl Camilleri (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: