作者:瀚高PG实验室 (Highgo PG Lab)-海无涯
highgo=# SELECT * FROMpg_create_physical_replication_slot('testone');
错误: 55000: 复制槽只有当 max_replication_slots > 0时才能使用
原因:max_replication_slots设置值太小
当参数wal_level设置为replica(or higher)的时候max_replication_slots值如果低于目前所存在的复制槽的数量就会导致无法创建新的复制槽,该值默认为0,重启生效。
修改:
alter system set max_replication_slots=10
pg_ctl restart (生产环境慎重操作)
highgo=# show max_replication_slots ;
max_replication_slots
-----------------------
10
(1 row)
max_replication_slots
-----------------------
10
(1 row)