Check STANDBY PROMOTE actually promote the node

This commit is contained in:
Jaime Casanova
2010-10-23 19:54:45 -05:00
parent 028aeb452d
commit 91276394e8

View File

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