I have two servers in master-slave configuration format. They are in streaming state and synchronization state is "Sync".
I also used "repmgr" to make them as a cluster in primary and standby mode and once primary is down standby becomes primary, which is fine.
The issue is when I make primary server down the backup server comes up but in Read-only mode due to which I am unable to write to the backup server.
Kindly let me know what config should be performed to make the secondary/slave server work in read-write mode once primary server is down.
Regards, Diwakar Sharma
1 Answer 1
Without knowing the exact config for repmgr its hard to say exactly what's missing but have you configured a witness and configured automatic failover? These resources may help point you in the right direction.
https://www.2ndquadrant.com/en/blog/how-to-automate-postgresql-12-replication-and-failover-with-repmgr-part-2/ https://www.enterprisedb.com/postgres-tutorials/how-implement-repmgr-postgresql-automatic-failover https://repmgr.org/docs/repmgr.html#PROMOTING-STANDBY
HTH.