"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:
Ian Barwick
2018-08-16 11:50:54 +09:00
parent b61f853a69
commit 6ba49de44e
2 changed files with 5 additions and 0 deletions

View File

@@ -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)

View File

@@ -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);
}