I failed to add the schema "repmgr_%s" in all places where the repl_*

tables are used.
This commit is contained in:
Jaime Casanova
2010-10-18 09:34:14 -05:00
parent 378bdd7bd4
commit cd287f923a
2 changed files with 12 additions and 10 deletions

View File

@@ -310,7 +310,7 @@ do_master_register(void)
return;
}
if (!PQgetisnull(res, 0, 0)) /* schema exists */
if (!PQntuples(res) > 0) /* schema exists */
{
if (!force) /* and we are not forcing so error */
{
@@ -476,7 +476,7 @@ do_standby_register(void)
return;
}
if (PQgetisnull(res, 0, 0)) /* schema doesn't exists */
if (PQntuples(res) == 0) /* schema doesn't exists */
{
fprintf(stderr, "Schema repmgr_%s doesn't exists.", myClusterName);
PQclear(res);