repmgrd: remove duplicate local record check in BDR mode

This commit is contained in:
Ian Barwick
2018-03-06 12:31:07 +09:00
parent 9c72c0d66e
commit ed1bcb159e
2 changed files with 15 additions and 18 deletions

View File

@@ -354,10 +354,24 @@ main(int argc, char **argv)
/* Retrieve record for this node from the local database */
record_status = get_node_record(local_conn, config_file_options.node_id, &local_node_info);
/*
* Terminate if we can't find the local node record. This is a
* "fix-the-config" situation, not a lot else we can do.
*/
if (record_status != RECORD_FOUND)
{
log_error(_("no metadata record found for this node - terminating"));
log_hint(_("check that 'repmgr (primary|standby) register' was executed for this node"));
switch (config_file_options.replication_type)
{
case REPLICATION_TYPE_PHYSICAL:
log_hint(_("check that 'repmgr (primary|standby) register' was executed for this node"));
break;
case REPLICATION_TYPE_BDR:
log_hint(_("check that 'repmgr bdr register' was executed for this node"));
break;
}
PQfinish(local_conn);
terminate(ERR_BAD_CONFIG);