Ensure BDR-specific code only runs on BDR 2.x

The BDR support in repmgr is for a specific BDR 2.x use case, and
is not suitable for more recent BDR versions.
This commit is contained in:
Ian Barwick
2019-04-05 14:32:55 +09:00
parent c338bc9c5e
commit a8d560860d
2 changed files with 21 additions and 0 deletions

View File

@@ -93,6 +93,15 @@ do_bdr_register(void)
exit(ERR_BAD_CONFIG);
}
if (get_bdr_version_num() > 2)
{
log_error(_("\"repmgr bdr register\" is for BDR 2.x only"));
PQfinish(conn);
pfree(dbname);
exit(ERR_BAD_CONFIG);
}
/* check for a matching BDR node */
{
PQExpBufferData bdr_local_node_name;