use a constant to denote unknown replication lag

This commit is contained in:
Ian Barwick
2019-03-20 17:26:04 +09:00
parent 7204a0faf4
commit 314a1e8f4f
4 changed files with 5 additions and 5 deletions

View File

@@ -5050,13 +5050,12 @@ get_replication_lag_seconds(PGconn *conn)
log_warning("%s", PQerrorMessage(conn));
PQclear(res);
/* XXX magic number */
return -1;
return UNKNOWN_REPLICATION_LAG;
}
if (!PQntuples(res))
{
return -1;
return UNKNOWN_REPLICATION_LAG;
}
lag_seconds = atoi(PQgetvalue(res, 0, 0));