We have deployed a postgres cluster on Patroni. In which replication is not working, I am also getting an error ‘replication slot does not exist’ . Can anyone please help me with this issue, we are stucked here from a very long time. I am posting my patroni.yml file, if any changes I need to do please suggest:
/etc/patroni.yml
scope: postgres
namespace: /db/
name: node1
restapi:
listen: 172.31.15.65:8008
connect_address: 172.31.15.65:8008
etcd:
host: 172.31.13.20:2379
bootstrap:
dcs:
ttl: 30
loop_wait: 10
retry_timeout: 10
maximum_lag_on_failover: 1048576
postgresql:
use_pg_rewind: true
use_slots: true
parameters:
wal_level: replica
hot_standby: “on”
wal_keep_segments: 8
max_wal_senders: 5
max_replication_slots: 5
checkpoint_timeout: 3
initdb:
- encoding: UTF8
- data-checksums
pg_hba:
- host replication replicator 127.0.0.1/32 md5
- host replication replicator 172.31.15.65/0 md5
- host replication replicator 172.31.0.176/0 md5
- host replication replicator 172.31.6.24/0 md5
- host all all 0.0.0.0/0 md5
users:
admin:
password: admin
options:
- createrole
- createdb
postgresql:
listen: 172.31.15.65:5432
connect_address: 172.31.15.65:5432
data_dir: /data/patroni
pgpass: /tmp/pgpass
authentication:
replication:
username: replicator
password: password
superuser:
username: postgres
password: password
parameters:
unix_socket_directories: ‘.’
#tags:
#nofailover: false
#noloadbalance: false
#clonefrom: false
#nosync: false
I have referred this installation process : https://www.alibabacloud.com/blog/how-to-set-up-a-highly-available-postgresql-cluster-using-patroni-on-ubuntu-16-04_594477