mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 08:56:29 +00:00
daemon status: add column "upstream last seen"
This displays the interval (in seconds) since the repmgrd instance on each node last confirmed its upstream node is available.
This commit is contained in:
@@ -5086,7 +5086,10 @@ get_primary_last_seen(PGconn *conn)
|
||||
initPQExpBuffer(&query);
|
||||
|
||||
appendPQExpBufferStr(&query,
|
||||
"SELECT repmgr.get_primary_last_seen()");
|
||||
"SELECT CASE WHEN pg_catalog.pg_is_in_recovery() IS FALSE "
|
||||
" THEN -1 "
|
||||
" ELSE repmgr.get_primary_last_seen() "
|
||||
" END AS primary_last_seen ");
|
||||
|
||||
res = PQexec(conn, query.data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user