From bdcc4d9e838b4d55dfd0a56ca734d36884c06952 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 29 Nov 2018 11:07:33 +0900 Subject: [PATCH] Check correct result status in ...primary_last_seen() functions --- dbutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbutils.c b/dbutils.c index 5e955520..a1bb8e9f 100644 --- a/dbutils.c +++ b/dbutils.c @@ -3233,7 +3233,7 @@ set_primary_last_seen(PGconn *conn) 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()")); } @@ -3257,7 +3257,7 @@ get_primary_last_seen(PGconn *conn) 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()")); }