cluster cleanup: standardize error message and return code

This commit is contained in:
Ian Barwick
2015-11-05 15:54:58 +09:00
parent 6e94432282
commit c0911d3286

View File

@@ -710,11 +710,11 @@ do_cluster_cleanup(void)
res = PQexec(master_conn, sqlquery);
if (PQresultStatus(res) != PGRES_COMMAND_OK)
{
log_err(_("cluster cleanup: Couldn't clean history\n%s\n"),
log_err(_("cluster cleanup: unable to delete monitoring records\n%s\n"),
PQerrorMessage(master_conn));
PQclear(res);
PQfinish(master_conn);
exit(ERR_BAD_CONFIG);
exit(ERR_DB_QUERY);
}
PQclear(res);