Ensure witness node sets last upstream seen time

This commit is contained in:
Ian Barwick
2019-03-14 10:53:12 +09:00
parent c1d6753081
commit 56d9f5b856
5 changed files with 27 additions and 17 deletions

View File

@@ -391,10 +391,6 @@ get_upstream_last_seen(PG_FUNCTION_ARGS)
if (!shared_state)
PG_RETURN_INT32(-1);
/* A primary is always visible */
if (!RecoveryInProgress())
PG_RETURN_INT32(0);
LWLockAcquire(shared_state->lock, LW_SHARED);
last_seen = shared_state->upstream_last_seen;