版本:v2.7
Postgre SQL-wal2json配置方法
Postgre SQL开启wal2json
[postgres@localhost ~]$ git clone https://github.com/eulerto/wal2json.git
[postgres@localhost ~]$ cd wal2json
[postgres@localhost ~]$ PATH=/path/to/pg/bin:$PATH
[postgres@localhost ~]$ USE_PGXS=1 make
[postgres@localhost ~]$ USE_PGXS=1 make install
数据库配置文件中至少有以下配置,参数的值可以更大
[postgres@localhost ~]$ cat /usr/local/pgsql/data/postgresql.conf
wal_level = logical
max_replication_slots = 1
max_wal_senders = 1
重启PG数据库
[postgres@localhost ~]$ pg_ctl stop -D /usr/local/pgsql/data
[postgres@localhost ~]$ pg_ctl start -D /usr/local/pgsql/data