* 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);
{
*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;
}