SOLVED pg到pg同步,报错
-
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 TABLErsocket_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) -