## vi postgressql.conf(重启生效)
listen_addresses = '*'
wal_level=logical
max_replication_slots=8
max_wal_senders=10
## alter system set
alter system set wal_level=logical;
## 参数说明
wal_level设置为logical,才支持逻辑复制,低于这个级别逻辑复制不能工作。
max_replication_slots设置值必须大于订阅的数量。
max_wal_senders设置值必须大于max_replication_slots参数值加上物理备库数,因为每个订阅在主库上都会占用主库一个wal发送进程。
3.发布端配置pg_hba.conf
vi pg_hba.conf
host replication test 0/0 md5
4.订阅端配置参数
## vi postgresql.conf(重启生效)
listen_addresses = '*'
wal_level=logical