mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
"standby promote": improve log messages
Make it clearer what repmgr is waiting for, and what to do if the promotion appears to fail.
This commit is contained in:
1
HISTORY
1
HISTORY
@@ -1,6 +1,7 @@
|
||||
|
||||
4.1.1 2018-??-??
|
||||
repmgr: truncate version string, if necessary; GitHub #490 (Ian)
|
||||
repmgr: improve messages emitted during "standby promote" (Ian)
|
||||
repmgrd: ensure that sending SIGHUP always results in the log file
|
||||
being reopened; GitHub #485 (Ian)
|
||||
repmgrd: report version number *after* logger initialisation; GitHub #487 (Ian)
|
||||
|
||||
@@ -2050,6 +2050,8 @@ _do_standby_promote_internal(PGconn *conn)
|
||||
local_node_record.node_name,
|
||||
local_node_record.node_id,
|
||||
script);
|
||||
log_detail(_("waiting up to %i seconds (parameter \"promote_check_timeout\") for promotion to complete"),
|
||||
config_file_options.promote_check_timeout);
|
||||
|
||||
r = system(script);
|
||||
if (r != 0)
|
||||
@@ -2075,6 +2077,8 @@ _do_standby_promote_internal(PGconn *conn)
|
||||
if (recovery_type == RECTYPE_STANDBY)
|
||||
{
|
||||
log_error(_("STANDBY PROMOTE failed, node is still a standby"));
|
||||
log_detail(_("node still in recovery after %i seconds"), config_file_options.promote_check_timeout);
|
||||
log_hint(_("the node may need more time to promote itself, check the PostgreSQL log for details"));
|
||||
PQfinish(conn);
|
||||
exit(ERR_PROMOTION_FAIL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user