mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
Check correct result status in ...primary_last_seen() functions
This commit is contained in:
@@ -3233,7 +3233,7 @@ set_primary_last_seen(PGconn *conn)
|
|||||||
|
|
||||||
res = PQexec(conn, query.data);
|
res = PQexec(conn, query.data);
|
||||||
|
|
||||||
if (PQresultStatus(res) != PGRES_COMMAND_OK)
|
if (PQresultStatus(res) != PGRES_TUPLES_OK)
|
||||||
{
|
{
|
||||||
log_db_error(conn, query.data, _("unable to execute repmgr.set_primary_last_seen()"));
|
log_db_error(conn, query.data, _("unable to execute repmgr.set_primary_last_seen()"));
|
||||||
}
|
}
|
||||||
@@ -3257,7 +3257,7 @@ get_primary_last_seen(PGconn *conn)
|
|||||||
|
|
||||||
res = PQexec(conn, query.data);
|
res = PQexec(conn, query.data);
|
||||||
|
|
||||||
if (PQresultStatus(res) != PGRES_COMMAND_OK)
|
if (PQresultStatus(res) != PGRES_TUPLES_OK)
|
||||||
{
|
{
|
||||||
log_db_error(conn, query.data, _("unable to execute repmgr.get_primary_last_seen()"));
|
log_db_error(conn, query.data, _("unable to execute repmgr.get_primary_last_seen()"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user