mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 15:16:29 +00:00
Clean up log messages for invalid LSNs
This commit is contained in:
17
repmgrd.c
17
repmgrd.c
@@ -1065,14 +1065,17 @@ do_failover(void)
|
||||
*/
|
||||
if(xlog_recptr == InvalidXLogRecPtr)
|
||||
{
|
||||
log_debug("Invalid LSN returned - '%s'", PQgetvalue(res, 0, 0));
|
||||
|
||||
if(lsn_format_ok == false)
|
||||
{
|
||||
/* Unable to parse value returned by `repmgr_get_last_standby_location()` */
|
||||
if(*PQgetvalue(res, 0, 0) == '\0')
|
||||
{
|
||||
log_crit("Whoops, seems as if shared_preload_libraries=repmgr_funcs is not set!\n");
|
||||
log_crit(
|
||||
_("Unable to obtain LSN from node %i"), nodes[i].node_id
|
||||
);
|
||||
log_info(
|
||||
_("Please check that 'shared_preload_libraries=repmgr_funcs' is set\n")
|
||||
);
|
||||
exit(ERR_BAD_CONFIG);
|
||||
}
|
||||
|
||||
@@ -1083,6 +1086,14 @@ do_failover(void)
|
||||
log_warning(_("Unable to parse LSN \"%s\"\n"),
|
||||
PQgetvalue(res, 0, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
log_debug(
|
||||
_("Invalid LSN returned from node %i: '%s'\n"),
|
||||
nodes[i].node_id,
|
||||
PQgetvalue(res, 0, 0)
|
||||
);
|
||||
}
|
||||
|
||||
PQclear(res);
|
||||
PQfinish(node_conn);
|
||||
|
||||
Reference in New Issue
Block a user