From: Simon Riggs Date: Thu, 1 Oct 2009 15:04:23 +0000 (+0100) Subject: Remove special handling of very long standby delays. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=6a8e01c63c7961e6d17754919ed0bab735849641;p=users%2Fsimon%2Fpostgres.git Remove special handling of very long standby delays. --- 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; }