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:
Jaime Casanova
2010-11-10 13:13:53 -05:00
parent 3172ad97cf
commit d9eee72bf0
2 changed files with 29 additions and 8 deletions

View File

@@ -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