From 91276394e82eba8335032f4ca29636234d4b5799 Mon Sep 17 00:00:00 2001 From: Jaime Casanova Date: Sat, 23 Oct 2010 19:54:45 -0500 Subject: [PATCH] Check STANDBY PROMOTE actually promote the node --- repmgr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/repmgr.c b/repmgr.c index 0f25d163..65eb76a5 100644 --- a/repmgr.c +++ b/repmgr.c @@ -1022,6 +1022,12 @@ do_standby_promote(void) return; } + /* reconnect to check we got promoted */ + conn = establishDBConnection(conninfo, true); + if (is_standby(conn)) + fprintf(stderr, "%s: STANDBY PROMOTE failed, this is still a standby node\n", progname); + PQfinish(conn); + return; }