Hi All,
I have a 3-node PostgreSQL 17 cluster with repmgr configured for replication and automatic failover. I have log_file configured in repmgr.conf to write to: /var/log/repmgr/repmgr.log
This was working fine for a while — I was able to see log entries every 5 minutes from repmgrd.
However, as of today, logs have stopped being generated on two of the three nodes.
Here are the steps I originally used to configure logging:
sudo mkdir -p /var/log/repmgr/
sudo chown postgres:postgres /var/log/repmgr/
sudo chmod 755 /var/log/repmgr/
sudo touch /var/log/repmgr/repmgr.log
sudo chown postgres:postgres /var/log/repmgr/repmgr.log
sudo chmod 640 /var/log/repmgr/repmgr.log
sudo systemctl restart repmgrd
sudo tail -f /var/log/repmgr/repmgr.log
Whenever the logs stop, I run: sudo -u postgres repmgrd -f /etc/repmgr.conf --verbose and the logs start getting generated again.
My question is:
What is the correct way to keep repmgrd logging continuously, so that I don’t have to manually restart the process whenever logs stop?
Any suggestions or best practices for ensuring continuous repmgrd logging (especially after reboots) would be very helpful.
Thanks in Advance!