mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-24 23:56:29 +00:00
Log text of failed queries at log level ERROR
Previously query texts were always logged at log level DEBUG, but that doesn't help much in a normal production environment when trying to identify the cause of issues. Also make various other minor improvements to query logging and handling of database errors. Implements GitHub #498.
This commit is contained in:
2
HISTORY
2
HISTORY
@@ -1,4 +1,6 @@
|
|||||||
4.1.1 2018-??-??
|
4.1.1 2018-??-??
|
||||||
|
logging: explicitly log the text of failed queries as ERRORs to
|
||||||
|
assist logfile analysis; GitHub #498
|
||||||
repmgr: truncate version string, if necessary; GitHub #490 (Ian)
|
repmgr: truncate version string, if necessary; GitHub #490 (Ian)
|
||||||
repmgr: improve messages emitted during "standby promote" (Ian)
|
repmgr: improve messages emitted during "standby promote" (Ian)
|
||||||
repmgr: "standby clone" - don't copy external config files in --dry-run
|
repmgr: "standby clone" - don't copy external config files in --dry-run
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<sect1 id="release-4.1.1">
|
<sect1 id="release-4.1.1">
|
||||||
<title>Release 4.1.1</title>
|
<title>Release 4.1.1</title>
|
||||||
<para><emphasis>??? ??? ??, 2018</emphasis></para>
|
<para><emphasis>Wed September 5, 2018</emphasis></para>
|
||||||
<para>
|
<para>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -33,6 +33,14 @@
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Text of any failed queries will now be logged as <literal>ERROR</literal> to assist
|
||||||
|
logfile analysis at log levels higher than <literal>DEBUG</literal>.
|
||||||
|
(GitHub #498).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|||||||
@@ -1346,7 +1346,13 @@ do_cluster_cleanup(void)
|
|||||||
|
|
||||||
entries_to_delete = get_number_of_monitoring_records_to_delete(primary_conn, runtime_options.keep_history);
|
entries_to_delete = get_number_of_monitoring_records_to_delete(primary_conn, runtime_options.keep_history);
|
||||||
|
|
||||||
if (entries_to_delete == 0)
|
if (entries_to_delete < 0)
|
||||||
|
{
|
||||||
|
log_error(_("unable to query number of monitoring records to clean up"));
|
||||||
|
PQfinish(primary_conn);
|
||||||
|
exit(ERR_DB_QUERY);
|
||||||
|
}
|
||||||
|
else if (entries_to_delete == 0)
|
||||||
{
|
{
|
||||||
log_info(_("no monitoring records to delete"));
|
log_info(_("no monitoring records to delete"));
|
||||||
PQfinish(primary_conn);
|
PQfinish(primary_conn);
|
||||||
|
|||||||
@@ -64,12 +64,10 @@ do_primary_register(void)
|
|||||||
PQfinish(conn);
|
PQfinish(conn);
|
||||||
exit(ERR_BAD_CONFIG);
|
exit(ERR_BAD_CONFIG);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
log_error(_("unable to determine server's recovery type"));
|
||||||
log_error(_("connection to node lost"));
|
PQfinish(conn);
|
||||||
PQfinish(conn);
|
exit(ERR_DB_CONN);
|
||||||
exit(ERR_DB_CONN);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
log_verbose(LOG_INFO, _("server is not in recovery"));
|
log_verbose(LOG_INFO, _("server is not in recovery"));
|
||||||
|
|||||||
Reference in New Issue
Block a user