PostgreSQL与es的数据同步方案调研
1、logstash
基于时间戳,或者id增量同步,且不能实时同步暂不考虑
2、pg-es-fdw
https://github.com/Mikulas/pg-es-fdw
python> = 2.7 <3,任何elasticsearch(基于两年前的情况),postgres> = 9.2
已存档
年久失修且不在维护,故不考虑
3、Go-amazonriver
https://github.com/hellobike/amazonriver
Postgresql 9.4 or later
Kafka 0.8 or later
ElasticSearch 5.x
仅支持es5.x,有坑且不怎么维护了,不考虑
4、abc import
https://github.com/appbaseio/abc
维护没Debezium活跃,但无需借助kafka,可以考虑
5、Debezium
https://github.com/debezium/debezium
基于kafka,支持mysql,mongo,postgresql,github提交活跃,可以考虑
6、datax
https://github.com/alibaba/DataX
datax提供将各种RDBMS数据库离线同步至elasticsearch的功能,当然可以使用datax将postgresql或者greenplum中的数据同步到elasticsearch。
7、tunnal/amazonriver
https://github.com/hellobike/tunnel
https://github.com/hellobike/amazonriver
Postgresql 9.4 or later
Kafka 0.8 or later
ElasticSearch 5.x
不怎么维护了
tunnal/amazonriver支持实时同步功能,利用pg内部的逻辑复制功能,通过在pg创建逻辑复制槽,接收数据库的逻辑变更,通过解析test_decoding特定格式的消息,得到逻辑数据。