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

PostgresConnector does not allow a numeric slot name

    XMLWordPrintable

Details

    • Hide
      1. Create postgresql-connector with numeric slot name by the following command:
        curl -i -X POST -H "Accept:application/json" -H  "Content-Type:application/json" http://localhost:8083/connectors/ -d'
        {
          "name": "postgresql-connector",
          "config": {
            "connector.class": "io.debezium.connector.postgresql.PostgresConnector",
            "database.hostname": "postgresql",
            "database.port": "5432",
            "database.user": "postgres",
            "database.password": "postgres",
            "database.dbname": "postgres",
            "slot.name": "123",
            "database.server.name": "test"
          }
        }'
        
      2. Check log or connector status using the following command:
        curl -XGET http://localhost:8083/connectors/postgresql-connector/status
        

      AR:

      Caused by: org.postgresql.util.PSQLException: ERROR: syntax error
             at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
             at org.postgresql.core.v3.QueryExecutorImpl.processCopyResults(QueryExecutorImpl.java:1116)
             at org.postgresql.core.v3.QueryExecutorImpl.startCopy(QueryExecutorImpl.java:842)
             at org.postgresql.core.v3.replication.V3ReplicationProtocol.initializeReplication(V3ReplicationProtocol.java:58)
             at org.postgresql.core.v3.replication.V3ReplicationProtocol.startLogical(V3ReplicationProtocol.java:42)
             at org.postgresql.replication.fluent.ReplicationStreamBuilder$1.start(ReplicationStreamBuilder.java:38)
             at org.postgresql.replication.fluent.logical.LogicalStreamBuilder.start(LogicalStreamBuilder.java:37)
             at io.debezium.connector.postgresql.connection.PostgresReplicationConnection.startPgReplicationStream(PostgresReplicationConnection.java:297)
             at io.debezium.connector.postgresql.connection.PostgresReplicationConnection.createReplicationStream(PostgresReplicationConnection.java:189)
             at io.debezium.connector.postgresql.connection.PostgresReplicationConnection.startStreaming(PostgresReplicationConnection.java:179)
             at io.debezium.connector.postgresql.RecordsStreamProducer.start(RecordsStreamProducer.java:105)
             ... 11 more
      
      Show
      Create postgresql-connector with numeric slot name by the following command: curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" http://localhost:8083/connectors/ -d' { "name": "postgresql-connector", "config": { "connector.class": "io.debezium.connector.postgresql.PostgresConnector", "database.hostname": "postgresql", "database.port": "5432", "database.user": "postgres", "database.password": "postgres", "database.dbname": "postgres", "slot.name": "123", "database.server.name": "test" } }' Check log or connector status using the following command: curl -XGET http://localhost:8083/connectors/postgresql-connector/status AR: Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) at org.postgresql.core.v3.QueryExecutorImpl.processCopyResults(QueryExecutorImpl.java:1116) at org.postgresql.core.v3.QueryExecutorImpl.startCopy(QueryExecutorImpl.java:842) at org.postgresql.core.v3.replication.V3ReplicationProtocol.initializeReplication(V3ReplicationProtocol.java:58) at org.postgresql.core.v3.replication.V3ReplicationProtocol.startLogical(V3ReplicationProtocol.java:42) at org.postgresql.replication.fluent.ReplicationStreamBuilder$1.start(ReplicationStreamBuilder.java:38) at org.postgresql.replication.fluent.logical.LogicalStreamBuilder.start(LogicalStreamBuilder.java:37) at io.debezium.connector.postgresql.connection.PostgresReplicationConnection.startPgReplicationStream(PostgresReplicationConnection.java:297) at io.debezium.connector.postgresql.connection.PostgresReplicationConnection.createReplicationStream(PostgresReplicationConnection.java:189) at io.debezium.connector.postgresql.connection.PostgresReplicationConnection.startStreaming(PostgresReplicationConnection.java:179) at io.debezium.connector.postgresql.RecordsStreamProducer.start(RecordsStreamProducer.java:105) ... 11 more

    Description

      PostgreSQL allows to use a numeric slot name (for more details refer to Querying And Manipulating Replication Slots) but the PostgresConnector fails when I specify numeric slot name in connector settings.

      The following command succeeds in psql:

      select pg_create_logical_replication_slot('123', 'decoderbufs');
      

      Attachments

        Activity

          People

            andrey.pustovetov@gmail.com Andrey Pustovetov
            andrey.pustovetov@gmail.com Andrey Pustovetov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: