From b4d6966283574699974a38f5d0dd8f9575df8d71 Mon Sep 17 00:00:00 2001 From: Jaime Casanova Date: Wed, 10 Nov 2010 13:41:05 -0500 Subject: [PATCH] After 30 minutes of retry we are supposed to exit, so do that... --- repmgrd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/repmgrd.c b/repmgrd.c index afe7a23d..15304e74 100644 --- a/repmgrd.c +++ b/repmgrd.c @@ -240,6 +240,11 @@ MonitorExecute(void) } } } + if (PQstatus(primaryConn) != CONNECTION_OK) + { + fprintf(stderr, "\n%s: We couldn't reconnect for long enough, exiting...\n", progname); + exit(1); + } /* Check if we still are a standby, we could have been promoted */ if (!is_standby(myLocalConn))