From 6a8e01c63c7961e6d17754919ed0bab735849641 Mon Sep 17 00:00:00 2001 From: Simon Riggs Date: Thu, 1 Oct 2009 16:04:23 +0100 Subject: [PATCH] Remove special handling of very long standby delays. --- src/backend/access/transam/xlog.c | 4 ++-- src/backend/utils/cache/inval.c | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 59c4329697..51280c63c6 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -5902,8 +5902,8 @@ GetLatestReplicationDelay(void) * a replication situation at all, just a recover from backup. * So return a special value instead. */ - if (delay_secs > (long)(INT_MAX / 1000)) - delay = -1; + if (delay_secs > (long)(INT_MAX)) + delay = 0; else delay = (int)(delay_secs * 1000) + (delay_usecs / 1000); diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c index d05e7a2246..9241f8a873 100644 --- a/src/backend/utils/cache/inval.c +++ b/src/backend/utils/cache/inval.c @@ -1415,14 +1415,6 @@ InitStandbyDelayTimers(int *currentDelay_ms, int *standbyWait_ms) { *currentDelay_ms = GetLatestReplicationDelay(); - /* - * If replication delay is enormously huge, just treat that as - * zero and work up from there. This prevents us from acting - * foolishly when replaying old log files. - */ - if (*currentDelay_ms < 0) - *currentDelay_ms = 0; - #define STANDBY_INITIAL_WAIT_MS 1 *standbyWait_ms = STANDBY_INITIAL_WAIT_MS; } -- 2.39.5