mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 00:26:30 +00:00
Make repmgrd retry connection to current master 3 times (every 5 min),
then try to get a new master 30 times (every 10 min) before exit. It's not retrying forever because after some attempts it gives an error of multiple files opened.
This commit is contained in:
@@ -181,6 +181,8 @@ getMasterConnection(PGconn *standby_conn, int id, char *cluster, int *master_id)
|
||||
*master_id = atoi(PQgetvalue(res1, i, 0));
|
||||
strcpy(master_conninfo, PQgetvalue(res1, i, 2));
|
||||
master_conn = establishDBConnection(master_conninfo, false);
|
||||
if (PQstatus(master_conn) != CONNECTION_OK)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* I can't use the is_standby() function here because on error that
|
||||
|
||||
Reference in New Issue
Block a user