Remove special handling of very long standby delays.
authorSimon Riggs <simon@2ndQuadrant.com>
Thu, 1 Oct 2009 15:04:23 +0000 (16:04 +0100)
committerSimon Riggs <simon@2ndQuadrant.com>
Thu, 1 Oct 2009 15:04:23 +0000 (16:04 +0100)
src/backend/access/transam/xlog.c
src/backend/utils/cache/inval.c

index 59c432969753caceb6bf6013deda0648f6402104..51280c63c69af3b1c915b6c8d73838cb6a15507f 100644 (file)
@@ -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);
 
index d05e7a22467c99e78a4894d7aa6ef5167f8715b0..9241f8a8736437fae4b4888331bd32335de1add8 100644 (file)
@@ -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;
 }