Git Product home page Git Product logo

rds_dbsync's Introduction

dbsync 项目

dbsync 项目目标是围绕 PostgreSQL Greenplum ,实现易用的数据的互迁功能。

支持的功能

  1. PostgreSQL -> PostgreSQL pgsql2pgsql

    功能 pg->pg 全量+增量数据同步

    状态:已开源 文档

  2. MySQL -> PostgreSQL/Greenplum(binlog_minner binlog_loader)

    功能:基于 MySQL binlog 解析的增量数据同步

    状态:已开放二进制 文档

  3. PostgreSQL -> PostgreSQL/Greenplum pgsql2gp

    功能:基于 PostgreSQL 逻辑日志的增量数据同步

    状态:未开发完成

  4. MySQL -> PostgreSQL/Greenplum mysql2pgsql

    功能:以表为单位的多线程全量数据迁移

    状态:已开源 文档

项目成员

该项目由阿里云 PostgreSQL 小组开发,为 PostgreSQL 世界贡献一份力量

  1. PM & 架构设计 曾文旌(义从)
  2. PD 萧少聪(铁庵)
  3. TESTER & 技术支持 周正中(德歌)
  4. DEV 张广舟(明虚)曾文旌(义从)

使用方法

  1. 修改配置文件 my.cfg 中相关的项,例如需求 MySQL -> PostgreSQL 全量迁移,不需要增量,则只需要配置 src.mysql 和 desc.pgsql ,其他的项不用管。
  2. 执行对应二进制,在二进制所在目录执行 ./mysql2pgsql

编译步骤

从零开始

  1. 下载代码

git clone https://github.com/aliyun/rds_dbsync.git

  1. 下载安装mysql的开发包

下载repo的rpm: wget http://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm

安装repo:rpm -Uvh mysql57-community-release-el6-9.noarch.rpm

编辑 /etc/yum.repos.d/mysql-community.repo,把除mysql 57外的其他repo的enable设为0

查看可安装的mysql报:yum list mysql-community-*

安装mysql的开发包: yum install mysql-community-devel.x86_64

  1. 下载安装pg的安装包

下载repo的rpm: wget https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm

安装repo:rpm -ivh pgdg-centos96-9.6-3.noarch.rpm

编辑/etc/yum.repos.d/pgdg-96-centos.repo,可能需要把https改成http

查看可安装的pg包:yum list postgresql96*

安装pg的server和开发包:yum install postgresql96-devel.x86_64 postgresql96-server.x86_64

  1. 执行make

  2. 打包二进制 make package 将生成一个install目录,里面有二进制和lib

  3. 执行dbsync:cd install; bin/mysql2pgsql ; bin/pgsql2pgsql ; bin/demo

打包docker镜像

以上手动步骤,已集成进 Dockerfile,运行 docker build . 无意外即完成编译过程,镜像内同时包含 binlog_minner binlog_loader 两个二进制文件。

问题反馈

有任何问题,请反馈到 https://github.com/aliyun/rds_dbsync issues 或联系 [email protected]

rds_dbsync's People

Contributors

alibaba-oss avatar blindspoter avatar digoal avatar guangzhouzhang avatar thenorthmemory avatar troopson avatar wjzeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rds_dbsync's Issues

binlog_miner需要提供slave_net_timeout参数配置

当服务端 mysql master 设置slave_net_timeout值比较大(如3600),且 mysql master binlog 没有新增时,会出现binlog dump数量猛增,需要在客户端控制slave_net_timeout值的大小,一般为60s。

编译错误

/usr/bin/ld: cannot find -lxslt
/usr/bin/ld: cannot find -lxml2
/usr/bin/ld: cannot find -lpam
/usr/bin/ld: cannot find -ledit

环境:CentOS Linux release 7.2.1511 (Core) 64位,希望出一版免编译的。

输出日志信息需要优化,容易误导

比如:
exec CREATE SCHEMA _tmp_dbsync failed: ERROR: schema "_tmp_dbsync" already exists
exec CREATE SCHEMA _tmp_dbsync failed: ERROR: schema "_tmp_dbsync" already exists
exec CREATE SCHEMA _tmp_dbsync failed: ERROR: schema "_tmp_dbsync" already exists

ERROR: Got error reading packet from server: Lost connection to MySQL server during query
[miner] read binlog fail at mysql-bin.000655 12421553 old_off 12421553 error 1
[miner] begin dump binlog from mysql-bin.000655 12421553

从 MySQL中迁移增量数据到 Greenplum报错

执行
./binlog_miner
Adding table: auth_role
[miner] table white list:
[miner] 1 auth_role
[miner] table white list end:
[miner] begin dump binlog from mysql-bin.000001 4
[miner] Rotate mysql-bin.000001 0
ROLLBACK;

[empty]

NULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLtable copy failed Query 'COPY binlog_data (event,tbname,new_row,old_key) FROM stdin DELIMITERS ' ' with csv QUOTE ''''': ERROR: relation "binlog_data" does not exist
ERROR: Got error reading packet from server: Lost connection to MySQL server during query
[miner] read binlog fail at mysql-bin.000001 3850 old_off 3850 error 1
[miner] begin dump binlog from mysql-bin.000001 3850
worker thread exit, miner exit
[miner] Rotate mysql-bin.000001 0
worker thread exit, miner exit

增量上传在使用运维时,需要增强和优化的点

咱们这个项目需要完善的点,现在想到的有这些:

  1. 【重要】在增量同步时会遇到一个gp db 不同的schema有相同的tablename,即有同步不同的库会有相同的表名。这样同步到同一个gp同一个库时会有些元数据冲突:建议在_tmp_sync里面的_old_key建议变成<dbname.tablename>_old_key
  2. 【重要】为了便于运维,binlog_miner 这个服务应该 定时的告诉我们,它正在读哪个binlog,及binlog的position已经读到哪里了。
  3. 针对mysql instance的同步,一个instance里面有多个库,同步到对应的schema中。
  4. 【无关重要】binlog_miner输出日志会有一堆null,不影响服务
  5. 【可实现,也可以不实现,人工也是可以的】增量是alter,create这些DDL语句估计无法同时更新,如果不实现,建议还是要从binlog语句中解析出来,然后打印输出出来,让使用者可以一眼就能定位问题。
  6. 【使用者自己可以开发一个运维脚本】local gp中的binlog_data的历史数据要清理,可以出一个定时脚本

mysql导入greenplum的改进建议

1、工具可以导出生成的gp表结构,方便根据业务情况修改建表的分布键。
2、数据从mysql迁移到greenplum时能判断表结构存在就不重建表只导入数据。

centos下编译不通过

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/include/et -fpic -fpic -DFRONTEND -I./ -I/usr/pgsql-9.4/include -I/gaodun/dist/mysql/include -I. -I./ -I/usr/pgsql-9.4/include/server -I/usr/pgsql-9.4/include/internal -I/usr/include/et -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o mysql2pgsql.o mysql2pgsql.c
mysql2pgsql.c:256: error: conflicting types for ‘mysql2pgsql_sync_main’
pgsync.h:129: note: previous declaration of ‘mysql2pgsql_sync_main’ was here
make: *** [mysql2pgsql.o] Error 1
[root@test dbsync]# echo $?
2
[root@test dbsync]# gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC)
[root@test dbsync]# cat /etc/red
redhat-lsb/ redhat-release redis.conf
[root@test dbsync]# cat /etc/redhat-release
CentOS release 6.5 (Final)
[root@test dbsync]#

Minimal requriement: Mysql >= 5.6, Pgsql >= 9.3

己满足要求。

希望能支持断点续传的问题,让同步自动化就更好了

1、有时偶尔需要针对mysql或者Greenplum数据库进行重启操作,这种时候同步是否能继续接上呢?希望任一设备重启过程中中断的同步能继续跟上。
2、还有一个就是ECS可能难以确保不宕机或者需要重启服务器的情况,这种情况下重启完成能否接着上一次的任务继续同步呢?

编码问题

错误信息:COPY failed for table "aaaa": ERROR: invalid byte sequence for encoding "UTF8": 0xff

数据库编码utf8 ,表名utf8 ,mysql2psql配置文件utf8 ,gp中数据库编码utf8.

mysql到greenplum的增量同步时效性

这个工具可以做到多好?我看到描述文档里面是分钟级同步,不知道是在什么样的额压力条件下的测试结果。greenplum的insert,update和delete效率都是比较低的,如果源库的表更新都特别频繁,表也比较大,比如都是百万量级的,那么这个时效性还能够保证吗?会不会出现更新队列阻塞的情况呢?

mysql2psql完善需求

1、并发导出表的个数设置成配置参数。
2、设置是否导出数据:1-只导出表结构;2-导出数据。

希望能满足没有主键或唯一索引的表也能进行同步的需求

情景:
之前GP做过优化,所以分布健和分区字段都各自选择非自增id的比较合适的字段。GP要求分布健、分区字段必须存在于主键或者唯一索引字段中。那这种情况其实id除非作为分布健使用,然后再删除剔除分区,否则此表不适合创建主键,但是如此牺牲的确实数据库的性能了。
需求:
目前的rds_dbsync同步工具只支持GP当中带主键的表进行同步,所以这种情况下迫切希望能对没有主键的表也能进行同步。

优化PK限制条件

目前的限制 PK mysql 和 gp 要一致 且是第一列

mysql 和 gp的 pk要是同一个,并且都是第一列,希望去除“第一列”的限制

增量同步时会出现binlog_loader报错

麻烦帮忙看一下这个是什么原因
[root@ctc bin]# ./binlog_loader
Adding table: A1
Adding table: A2
target schema is public
NOTICE: relation "binlog_washer_status" already exists, skipping
NOTICE: relation "binlog_load_table_status" already exists, skipping
exec CREATE UNIQUE INDEX idx_binlog_load_table_status on binlog_load_table_status(tbname) failed: ERROR: relation "idx_binlog_load_table_status" already exists

[binlog_loader_main] applyid binlog from 57942
[washer] task 29 is ready to be wash from 40937 to 56699
exec insert into binlog_load_table_status (tbname) values('A2') failed: ERROR: duplicate key value violates unique constraint "idx_binlog_load_table_status"
DETAIL: Key (tbname)=(A2) already exists.

exec insert into binlog_load_table_status (tbname) values('A1') failed: ERROR: duplicate key value violates unique constraint "idx_binlog_load_table_status"
DETAIL: Key (tbname)=(A1) already exists.

exec CREATE SCHEMA _tmp_dbsync failed: ERROR: schema "_tmp_dbsync" already exists

exec CREATE SCHEMA _tmp_dbsync failed: ERROR: schema "_tmp_dbsync" already exists

NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'key' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'key' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
exec create table _tmp_dbsync.A1_old_key(key int8) failed: ERROR: relation "A1_old_key" already exists

exec create table _tmp_dbsync.A2_old_key(key int8) failed: ERROR: relation "A2_old_key" already exists

[loader] table A1 pk attr order_detail_id
[loader] table A2 pk attr id
[loader] task 26 step 1 table public.A2 load A2_old_key to remote 29 row complete, cost 53.517 ms
[loader] task 26 step 2 table delete public.A2 0 row use oldkey complete, cost 23.383 ms
COPY failed: ERROR: invalid input syntax for type timestamp: "1487691227" (seg0 GP-segment1-ctc-bj-10-254-8-10:40000 pid=31036)
CONTEXT: COPY A2, line 10, column 8774515
[loader] task 26 run faild
[loader] task 26 step 1 table public.A1 load A1_old_key to remote 137 row complete, cost 148.300 ms
[loader] task 26 step 2 table delete public.A1 125 row use oldkey complete, cost 17.880 ms
COPY failed: ERROR: duplicate key value violates unique constraint "A1_pkey" (seg1 GP-segment1-ctc-bj-10-254-8-10:40001 pid=31039)
DETAIL: Key (order_detail_id)=(11948632) already exists.
CONTEXT: COPY A1, line 168: "11948632|149042955|698838|白玉180g|1|0|4|0|1|00000000..."
[loader] task 26 run faild
[master] task 33 has been created, 51124 rows from 57942 to 109066 ready to be load
[binlog_loader_main] thread exit, proc exit

关于多库支持

目前计划将公司的一些微服务项目下的数据(单mysql实例,多库)汇总到GP里做统计分析,发现好像只支持单库,全量的倒是无所谓,可以一个一个同步完。增量的话比较麻烦,看是否能支持一下。
另:目前copy多个目录来跑不同库的增量同步,使用同一个local pg schema会不会有问题,如果可以的话,先这样克服下也OK。

make的时候报如下错误

[root@localhost dbsync]# make
Makefile:33: 警告:覆盖关于目标“clean”的命令
/usr/local/pgsql/lib/postgresql/pgxs/src/makefiles/pgxs.mk:211: 警告:忽略关于目标“clean”的旧命令
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -DMAP_HUGETLB=0x40000 -fpic -fpic -DFRONTEND -I./ -I/usr/local/pgsql/include -I/usr/local/mysql/include/ -I. -I./ -I/usr/local/pgsql/include/postgresql/server -I/usr/local/pgsql/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o pg_logicaldecode.o pg_logicaldecode.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -DMAP_HUGETLB=0x40000 -fpic -fpic -DFRONTEND -I./ -I/usr/local/pgsql/include -I/usr/local/mysql/include/ -I. -I./ -I/usr/local/pgsql/include/postgresql/server -I/usr/local/pgsql/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o pqformat.o pqformat.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -DMAP_HUGETLB=0x40000 -fpic -fpic -DFRONTEND -I./ -I/usr/local/pgsql/include -I/usr/local/mysql/include/ -I. -I./ -I/usr/local/pgsql/include/postgresql/server -I/usr/local/pgsql/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o stringinfo.o stringinfo.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -DMAP_HUGETLB=0x40000 -fpic -fpic -DFRONTEND -I./ -I/usr/local/pgsql/include -I/usr/local/mysql/include/ -I. -I./ -I/usr/local/pgsql/include/postgresql/server -I/usr/local/pgsql/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o utils.o utils.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -DMAP_HUGETLB=0x40000 -fpic -fpic -DFRONTEND -I./ -I/usr/local/pgsql/include -I/usr/local/mysql/include/ -I. -I./ -I/usr/local/pgsql/include/postgresql/server -I/usr/local/pgsql/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o misc.o misc.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -DMAP_HUGETLB=0x40000 -fpic -fpic -DFRONTEND -I./ -I/usr/local/pgsql/include -I/usr/local/mysql/include/ -I. -I./ -I/usr/local/pgsql/include/postgresql/server -I/usr/local/pgsql/include/postgresql/internal -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include -c -o pgsync.o pgsync.c
In file included from pgsync.c:23:
/usr/local/pgsql/include/zlib.h:86: 错误:expected specifier-qualifier-list before ‘z_const’
/usr/local/pgsql/include/zlib.h:1025: 错误:expected declaration specifiers or ‘...’ before ‘z_const’
/usr/local/pgsql/include/zlib.h:1349: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘Z_ARG’
/usr/local/pgsql/include/zlib.h:1673: 错误:expected specifier-qualifier-list before ‘z_off64_t’
/usr/local/pgsql/include/zlib.h:1748: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
/usr/local/pgsql/include/zlib.h:1758: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘Z_ARG’
make: *
* [pgsync.o] 错误 1
[root@localhost dbsync]#

binlog_miner无法支持date/time类型

mysql date类型: 2016-04-04 在binlog_date表里面会写成2016:04:04,这样的话,导入到gp里面会报错。
估计mysql time类型也会报错。

mysql2postgresql、dbsync 支持 geometry 类型同步

mysql2postgresql、dbsync 支持 geometry 类型同步。
我们有geometry类型的字段需要同步到 GP,目前不支持,请帮忙解决下。

数据示意如下:
geoloc geometry DEFAULT NULL COMMENT '空间地图坐标',

select AsText(geoloc) from tblaccountgps limit 10:
POINT(120.84300231933594 33.22600173950195)
POINT(120.84300231933594 46.65599822998047)
POINT(120.90550231933594 33.22600173950195)
POINT(120.90550231933594 46.65599822998047)
POINT(120.96800231933594 33.22600173950195)

个人建议——log日志如果加个时间的话就更好了

minner.log和loader.log日志有没有考虑在每一行日志前面加个当时执行的时间来记录下呢?这样的话如果发现同步过程中mysql和GP数据不对称也能快速定位到底是哪个时间段发生的,有助于缩短问题排查范围。

编译错误

编译报找不到头文件,不知如何解决,最好能出个二进制版本,谢谢!

[Bug] 遇到带有别名的字段会报错

./dbsync -d -l tablist.txt

在读取源table时,使用查询并做类型转换:

tablist.txt:
t1: select from_unixtime(mydate) as mydate from t1

这时生成的DDL语句,会缺失mydate的列名。

捕捉到不重要的日志,造成dbsync退出worker thread exit, miner exit

您好,我是rds_dbsync加postgresql的mysql_fdw做的实时同步,通过触发器实现的数据同步,当天运行没问题,第二天运行就出现如下错误,是因为触发器执行的时候远程MySQL由于网络原因造成错误使同步终止,您能保证这样的日志捕捉功能有效的同时,不要中断程序运行,让程序一直进行下去.
错误日志如下:
COPY failed for table binlog_data: ERROR: failed to prepare the MySQL query:
MySQL server has gone away
CONTEXT: SQL statement " select * from fdw.activity WHERE ID='12312'"
PL/pgSQL function binlog_data_insert() line 10 at EXECUTE
worker thread exit, miner exit
worker thread exit, miner exit
worker thread exit, miner exit

PostgreSQL迁移PostgreSQL-XL测试

项目主页 https://github.com/aliyun/rds_dbsync
参考资料 https://yq.aliyun.com/articles/52815

######重点 只支持库对库,支持update delete insert,但不支持没有主键、DDL语句
rds_dbsync经测试能同步rds_dbsync程序启动之前的数据及后面修改的数据

备份表结构,这个时候我们可以修改表结构,所以我们能够对PostgreSQL-XL集群的表做定制化,这步操作需在local des两台机提前做好
/usr/local/pgsql/bin/pg_dump -F p -s --no-privileges --no-tablespaces --no-owner -h 192.168.1.20 -p 5432 -U pgxc pgxc | /usr/local/pgsql/bin/pgxc pgxc -f -

rds_dbsync分为三个角色 src local dec

测试
src 192.168.1.20 单台PostgreSQL
local 192.168.1.21 作为rds_dbsync,在数据库内会产生table(db_sync_status,sync_sqls),sequence(db_sync_status_id_seq,sync_sqls_id_seq)
des 192.168.1.26 为PostgreSQL-XL集群的协调器

src机器上必须有以下条件
alter role pgxc replication
postgres.conf 需要修改为
max_wal_senders = 8
max_replication_slots = 8
wal_level = logical

pg_hba.conf 需要修改为
host all all 192.168.1.0/24 trust
host replication pgxc 192.168.1.0/24 trust

ali扩展,拷贝文件到相应的目录
/usr/local/pgsql/share/ali_decoding.control
/usr/local/pgsql/lib/ali_decoding.so

local机器上配置
[src.pgsql]
connect_string = "host=192.168.1.20 dbname=pgxc port=5432 user=src password=123456"
[local.pgsql]
connect_string = "host=192.168.1.21 dbname=pgxc port=5432 user=local password=123456"
[desc.pgsql]
connect_string = "host=192.168.1.26 dbname=pgxc port=5432 user=des password=123456"
ignore_copy_error_count_each_table = "0"

src 上需要读取权限,local、des上需读写权限

希望能支持mysql当中MyISAM表的迁移

目前迁移工具支持mysql带innodb存储引擎的表进行增量同步,但是因为我们的mysql数据考虑到一些性能问题全部采用的是MyISAM存储引擎。如果要实现mysql到GP的同步的话,现有的存储引擎必须全都转换成Innodb才行,对现有业务影响很大。希望很快支持MyISAM表的迁移,这将对我们整个系统的帮助特别大。谢谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.