Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    SOLVED pg到pg同步,报错

    问答区
    pg to pg
    2
    2
    27
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 杨刚
      杨刚 last edited by 杨刚

      ca308b84-a699-445a-8c3f-499ad88a7238-image.png

      c27e7475-3f06-4ee0-b8a4-a09afe17b575-image.png

      cloudcanal版本:2.2.1.10
      pg版本:9.6.0
      pg建库:create database test;
      pg建表: create table tt(id serial not null,name text);
      pg源端插入: insert into tt(name) values (‘china’);

      在服务器上执行alter table “public”.“tt” replica identity full;正常:
      test=# alter table “public”.“tt” replica identity full;
      ALTER TABLE

      rsocket_send_receive.log日志报错:
      ERROR c.c.c.postgre.sidecar.spring.PostgresMetaServiceImpl - init pg replication info error,host:10.10.9.211:5432/test,msg:PSQLException: ERROR: syntax error
      java.lang.RuntimeException: Sqlalter table “public”.“tt” replica identity full executed failed.Msg:PSQLException: ERROR: syntax error
      at com.clougence.cloudcanal.postgre.worker.reader.incre.PostgresConnection.changeTableReplicaIdentityToFull(PostgresConnection.java:142)
      at com.clougence.cloudcanal.postgre.worker.reader.incre.PostgresConnection.initReplicationAndFetchStartLsn(PostgresConnection.java:103)
      at com.clougence.cloudcanal.postgre.sidecar.spring.PostgresMetaServiceImpl.initReplicationAndFetchLsn(PostgresMetaServiceImpl.java:239)
      at com.clougence.cloudcanal.sidecar.controller.rsocket.impl.PostgresMetaRController.initReplicationAndFetchLsn(PostgresMetaRController.java:223)
      at com.clougence.cloudcanal.sidecar.controller.rsocket.impl.PostgresMetaRController$$FastClassBySpringCGLIB$$175fddfc.invoke(<generated>)
      at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
      at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
      at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)
      at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
      at com.clougence.cloudcanal.sidecar.aspect.RSocketAsyncProcessAspect.lambda$execute$0(RSocketAsyncProcessAspect.java:60)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: org.postgresql.util.PSQLException: ERROR: syntax error
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2505)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2241)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:310)
      at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:447)
      at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:368)
      at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:309)
      at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:295)
      at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:272)
      at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:267)
      at com.clougence.cloudcanal.postgre.worker.reader.incre.PostgresConnection.changeTableReplicaIdentityToFull(PostgresConnection.java:138)

      junyu-cloudcanal 1 Reply Last reply Reply Quote 0
      • junyu-cloudcanal
        junyu-cloudcanal @杨刚 last edited by

        @杨刚 在 pg到pg同步,报错 中说:

        initReplicationAndFetchLsn

        建议从 pg10 做同步。。。

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Copyright © 2020 ClouGence, Inc.备案号:浙ICP备20007605号-2