postgresql - SymmetricDS Postgres 目标为所有 sym_* 表提供 "Failed to read table"

标签 postgresql docker symmetricds

我正在尝试设置从 MySQL 到 Postgres 的简单复制。相同的模式。按照 Demo Tutorial 中的步骤操作后经过轻微的更改(使用 MySQL 和 Postgres 驱动程序),我仍然无法使复制工作。

根据运行 bin/sym 后的投诉,需要进行一些更改

  1. SET GLOBAL show_compatibility_56 = ON 需要在 MySQL 数据库中设置
  2. 对于 Postgres,我需要使用 protocolVersion=3 而不是示例中设置的 2。

奇怪的是,SymmetricDS 能够创建 sym_* 表,但提示无法读取它们。我已经验证这些表在 bin/sym 运行之前不存在,但在运行之后确实存在。这是日志的摘录

// Successful creation of table
[store-001] - PostgreSqlSymmetricDialect - DDL applied: CREATE TABLE "sym_notification"(
    "notification_id" VARCHAR(128) NOT NULL,
    ...
    PRIMARY KEY ("notification_id")
)

...

// Unable to read from created table
[store-001] - PostgreSqlDdlReader - Failed to read table: sym_notification
[store-001] - PostgreSqlDdlReader - Failed to read table: sym_notification
[store-001] - AbstractDatabaseWriter - Did not find the sym_notification table in the target database
[store-001] - PostgreSqlDdlReader - Failed to read table: sym_monitor
[store-001] - PostgreSqlDdlReader - Failed to read table: sym_monitor
[store-001] - AbstractDatabaseWriter - Did not find the sym_monitor table in the target database

同样的错误适用于所有 sym_* 表。

数据库在 Docker 中运行,但由于 SymmetricDS 没有提示无法连接,并且能够创建表,我认为它与 Docker 无关。

Postgres DB 中的数据库是由 engines/store-001.properties 中指定的同一用户创建的。这是否仍然与角色和访问权限有关?

最佳答案

如果您从 Postgres 升级到最新的 JDBC 驱动程序,它将可以工作。

从此处的最新版本替换 lib 目录中的现有 Postgres 驱动程序:https://jdbc.postgresql.org/download.html

关于postgresql - SymmetricDS Postgres 目标为所有 sym_* 表提供 "Failed to read table",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40888672/

相关文章:

sql - 遍历表,对每一行执行计算

docker - 无需在每个Dockerfile中构建二进制文件即可构建多个Docker镜像

linux - 第 23 行 :/etc/init. d/setenv: 在 linux redhat 中没有这样的文件或目录

synchronization - SymmetricDS 同步未完美同步

windows - 是否可以在 Windows 上运行 linux docker 镜像

sql-server - 本地机器和云实例之间的单向 SymmetricDS 同步

postgresql - 使用 CMake 安装 libpq 依赖项

java - 如何使用 Hibernate for PostgreSQL 创建索引

php - 在 Postgres-DB 中存储/读取文件

node.js - 我们可以在nodejs和docker中使用http包吗