Merge remote branch 'gbartolini/gabriele-2010-12' into heroku

Conflicts:
	config.c
	dbutils.c
	dbutils.h
	repmgrd.c

Signed-off-by: Dan Farina <drfarina@acm.org>
This commit is contained in:
Dan Farina
2010-12-21 16:06:42 -08:00
6 changed files with 48 additions and 52 deletions

View File

@@ -299,7 +299,7 @@ do_master_register(void)
char conninfo[MAXLEN];
bool schema_exists = false;
const char *master_version = NULL;
char master_version[MAXVERSIONSTR];
/*
* Read the configuration file: repmgr.conf
@@ -315,7 +315,7 @@ do_master_register(void)
conn = establishDBConnection(conninfo, true);
/* master should be v9 or better */
master_version = pg_version(conn);
pg_version(conn, master_version);
if (strcmp(master_version, "") == 0)
{
PQfinish(conn);
@@ -484,8 +484,8 @@ do_standby_register(void)
int myLocalId = -1;
char conninfo[MAXLEN];
const char *master_version = NULL;
const char *standby_version = NULL;
char master_version[MAXVERSIONSTR];
char standby_version[MAXVERSIONSTR];
/*
* Read the configuration file: repmgr.conf
@@ -501,7 +501,7 @@ do_standby_register(void)
conn = establishDBConnection(conninfo, true);
/* should be v9 or better */
standby_version = pg_version(conn);
pg_version(conn, standby_version);
if (strcmp(standby_version, "") == 0)
{
PQfinish(conn);
@@ -548,7 +548,7 @@ do_standby_register(void)
return;
/* master should be v9 or better */
master_version = pg_version(master_conn);
pg_version(master_conn, master_version);
if (strcmp(master_version, "") == 0)
{
PQfinish(conn);
@@ -626,7 +626,7 @@ do_standby_clone(void)
const char *first_wal_segment = NULL;
const char *last_wal_segment = NULL;
const char *master_version = NULL;
char master_version[MAXVERSIONSTR];
/* if dest_dir hasn't been provided, initialize to current directory */
if (dest_dir == NULL)
@@ -709,7 +709,7 @@ do_standby_clone(void)
}
/* primary should be v9 or better */
master_version = pg_version(conn);
pg_version(conn, master_version);
if (strcmp(master_version, "") == 0)
{
PQfinish(conn);
@@ -1028,7 +1028,7 @@ do_standby_promote(void)
char recovery_file_path[MAXLEN];
char recovery_done_path[MAXLEN];
const char *standby_version = NULL;
char standby_version[MAXVERSIONSTR];
/*
* Read the configuration file: repmgr.conf
@@ -1045,7 +1045,7 @@ do_standby_promote(void)
conn = establishDBConnection(conninfo, true);
/* we need v9 or better */
standby_version = pg_version(conn);
pg_version(conn, standby_version);
if (strcmp(standby_version, "") == 0)
{
PQfinish(conn);
@@ -1140,8 +1140,8 @@ do_standby_follow(void)
int r;
char data_dir[MAXLEN];
const char *master_version = NULL;
const char *standby_version = NULL;
char master_version[MAXVERSIONSTR];
char standby_version[MAXVERSIONSTR];
/* Read the configuration file: repmgr.conf */
parse_config(config_file, myClusterName, &myLocalId, conninfo);
@@ -1163,7 +1163,7 @@ do_standby_follow(void)
}
/* should be v9 or better */
standby_version = pg_version(conn);
pg_version(conn, standby_version);
if (strcmp(standby_version, "") == 0)
{
PQfinish(conn);
@@ -1191,7 +1191,7 @@ do_standby_follow(void)
}
/* should be v9 or better */
master_version = pg_version(master_conn);
pg_version(master_conn, master_version);
if (strcmp(master_version, "") == 0)
{
PQfinish(conn);