PGLoader
Pgloader 是一个支持任意数据库迁移至 pgsql 的命令行工具。使用 COPY 流式传输协议将数据加载到 PostgreSQL 中,并使用单独的线程来读取和写入数据。
安装
安装有多种方式,Docker 安装、安装包安装、源码安装等。
这里我推荐使用源码安装,因为其他方式都可能会遇到各式各样的问题,但是源码安装我一遍就成功了。
步骤:(本人系统为 Centos)
- clone 项目。
git clone https://github.com/dimitri/pgloader.git
- 进入项目目录,执行 bootstrap-centos7.sh(脚本会自动帮你安装各种依赖)
cd pgloader
chmod +x ./bootstrap-centos7.sh
./bootstrap-centos7.sh
- 编译
make pgloader
- 检查是否安装成功
./build/bin/pgloader --version
./build/bin/pgloader --help