mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Log pg_control access errors as WARNINGs rather than DEBUG
This will make it easier to diagnose issues, possibly with an incorrect "data_directory" setting in "repmgr.conf".
This commit is contained in:
@@ -157,15 +157,18 @@ get_controlfile(const char *DataDir)
|
|||||||
|
|
||||||
if ((fd = open(ControlFilePath, O_RDONLY | PG_BINARY, 0)) == -1)
|
if ((fd = open(ControlFilePath, O_RDONLY | PG_BINARY, 0)) == -1)
|
||||||
{
|
{
|
||||||
log_debug("could not open file \"%s\" for reading: %s",
|
log_warning(_("could not open file \"%s\" for reading"),
|
||||||
ControlFilePath, strerror(errno));
|
ControlFilePath);
|
||||||
|
log_detail("%s", strerror(errno));
|
||||||
return control_file_info;
|
return control_file_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (read(fd, control_file_info->control_file, sizeof(ControlFileData)) != sizeof(ControlFileData))
|
if (read(fd, control_file_info->control_file, sizeof(ControlFileData)) != sizeof(ControlFileData))
|
||||||
{
|
{
|
||||||
log_debug("could not read file \"%s\": %s",
|
log_warning(_("could not read file \"%s\""),
|
||||||
ControlFilePath, strerror(errno));
|
ControlFilePath);
|
||||||
|
log_detail("%s", strerror(errno));
|
||||||
|
|
||||||
return control_file_info;
|
return control_file_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1381,7 +1381,7 @@ can_use_pg_rewind(PGconn *conn, const char *data_directory, PQExpBufferData *rea
|
|||||||
appendPQExpBuffer(reason, "; ");
|
appendPQExpBuffer(reason, "; ");
|
||||||
|
|
||||||
appendPQExpBuffer(reason,
|
appendPQExpBuffer(reason,
|
||||||
_("\"wal_log_hints\" is set to \"off\" but unable to determine checksum version"));
|
_("\"wal_log_hints\" is set to \"off\" but unable to determine data checksum version"));
|
||||||
can_use = false;
|
can_use = false;
|
||||||
}
|
}
|
||||||
else if (data_checksum_version == 0)
|
else if (data_checksum_version == 0)
|
||||||
@@ -1390,7 +1390,7 @@ can_use_pg_rewind(PGconn *conn, const char *data_directory, PQExpBufferData *rea
|
|||||||
appendPQExpBuffer(reason, "; ");
|
appendPQExpBuffer(reason, "; ");
|
||||||
|
|
||||||
appendPQExpBuffer(reason,
|
appendPQExpBuffer(reason,
|
||||||
_("\"wal_log_hints\" is set to \"off\" and checksums are disabled"));
|
_("\"wal_log_hints\" is set to \"off\" and data checksums are disabled"));
|
||||||
|
|
||||||
can_use = false;
|
can_use = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user