DC-DR Sync issue in Patroni PostgreSQL setup

Viewed 27

We have a 3 instance cluster in DC and a 3 instance cluster in DR as standby_cluster. For DC-DR real-time sync, we have added the DC cluster's leader's IP as standby_cluster IP in the DR patroni config. which is working fine and we are getting real-time syncing.

But in the case of changing DC leader internally, DR leader is not able to create a writable connection on the previous DC instance. and gets below error.

'FATAL: could not connect to the primary server: could not make a writable connection to server "13.233.76.9:5432"'

Can Anyone please help us for solving this issue? We are stuck on this issue for months.

For your reference:

pg_hba config: ` TYPE DATABASE USER ADDRESS METHOD

local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trust

local replication all trust host replication all 127.0.0.1/32 trust host replication all ::1/128 trust

host replication replicator 127.0.0.1/32 md5 host replication replicator 172.31.4.196/32 scram-sha-256 host replication replicator 172.31.2.237/32 scram-sha-256 host replication replicator 172.31.2.83/32 scram-sha-256 host replication replicator 172.31.45.26/32 scram-sha-256 host replication replicator 172.31.43.207/32 scram-sha-256 host replication replicator 172.31.42.188/32 scram-sha-256 host replication replicator 13.230.225.219/32 trust host replication replicator 13.200.182.158/32 trust host replication replicator 13.112.25.208/32 trust host replication replicator 0.0.0.0/32 trust `

DC Current Leader: 13.233.76.9 DC New Leader: 52.67.253.203 DR Leader: 13.230.225.219

0 Answers
Related