mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Add error code ERR_FOLLOW_FAIL
This commit is contained in:
@@ -44,5 +44,6 @@
|
||||
#define ERR_REGISTRATION_SYNC 20
|
||||
#define ERR_OUT_OF_MEMORY 21
|
||||
#define ERR_SWITCHOVER_INCOMPLETE 22
|
||||
#define ERR_FOLLOW_FAIL 23
|
||||
|
||||
#endif /* _ERRCODE_H_ */
|
||||
|
||||
@@ -2109,7 +2109,7 @@ do_standby_follow(void)
|
||||
log_hint(_("alter \"primary_follow_timeout\" in \"repmgr.conf\" to change this value"));
|
||||
}
|
||||
|
||||
exit(ERR_BAD_CONFIG);
|
||||
exit(ERR_FOLLOW_FAIL);
|
||||
}
|
||||
|
||||
if (runtime_options.dry_run == true)
|
||||
@@ -2128,7 +2128,7 @@ do_standby_follow(void)
|
||||
log_error(_("unable to find record for new upstream node %i"),
|
||||
runtime_options.upstream_node_id);
|
||||
PQfinish(primary_conn);
|
||||
exit(ERR_BAD_CONFIG);
|
||||
exit(ERR_FOLLOW_FAIL);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2161,7 +2161,7 @@ do_standby_follow(void)
|
||||
{
|
||||
log_error(_("unable to determine number of free replication slots on the primary"));
|
||||
PQfinish(primary_conn);
|
||||
exit(ERR_BAD_CONFIG);
|
||||
exit(ERR_FOLLOW_FAIL);
|
||||
}
|
||||
|
||||
if (free_slots == 0)
|
||||
@@ -2169,7 +2169,7 @@ do_standby_follow(void)
|
||||
log_error(_("no free replication slots available on the primary"));
|
||||
log_hint(_("consider increasing \"max_replication_slots\""));
|
||||
PQfinish(primary_conn);
|
||||
exit(ERR_BAD_CONFIG);
|
||||
exit(ERR_FOLLOW_FAIL);
|
||||
}
|
||||
else if (runtime_options.dry_run == true)
|
||||
{
|
||||
@@ -2193,7 +2193,7 @@ do_standby_follow(void)
|
||||
{
|
||||
log_error(_("unable to establish a replication connection to the primary node"));
|
||||
PQfinish(primary_conn);
|
||||
exit(ERR_BAD_CONFIG);
|
||||
exit(ERR_FOLLOW_FAIL);
|
||||
}
|
||||
else if (runtime_options.dry_run == true)
|
||||
{
|
||||
@@ -2210,7 +2210,7 @@ do_standby_follow(void)
|
||||
log_error(_("unable to query the primary node's system identification"));
|
||||
PQfinish(primary_conn);
|
||||
PQfinish(repl_conn);
|
||||
exit(ERR_BAD_CONFIG);
|
||||
exit(ERR_FOLLOW_FAIL);
|
||||
}
|
||||
|
||||
if (primary_identification.system_identifier != local_system_identifier)
|
||||
@@ -2221,7 +2221,7 @@ do_standby_follow(void)
|
||||
primary_identification.system_identifier);
|
||||
PQfinish(primary_conn);
|
||||
PQfinish(repl_conn);
|
||||
exit(ERR_BAD_CONFIG);
|
||||
exit(ERR_FOLLOW_FAIL);
|
||||
}
|
||||
else if (runtime_options.dry_run == true)
|
||||
{
|
||||
@@ -2308,7 +2308,7 @@ do_standby_follow_internal(PGconn *primary_conn, t_node_info *primary_node_recor
|
||||
log_error(_("unable to retrieve record for node %i"),
|
||||
config_file_options.node_id);
|
||||
|
||||
*error_code = ERR_BAD_CONFIG;
|
||||
*error_code = ERR_FOLLOW_FAIL;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2438,8 +2438,7 @@ do_standby_follow_internal(PGconn *primary_conn, t_node_info *primary_node_recor
|
||||
|
||||
if (!create_recovery_file(&local_node_record, &recovery_conninfo, config_file_options.data_directory, true))
|
||||
{
|
||||
/* XXX ERR_RECOVERY_FILE ??? */
|
||||
*error_code = ERR_BAD_CONFIG;
|
||||
*error_code = ERR_FOLLOW_FAIL;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user