Swap the arguments to TimestampDifferenceMilliseconds so that we get
a positive answer instead of zero.
Then use the result of that computation instead of ignoring it.
Per reports from Alexander Lakhin.
Discussion: http://postgr.es/m/
8b686764-7ac1-74c3-70f9-
b64685a2535f@gmail.com
* drifting to something that is not a multiple of ten.
*/
timeout_in_ms -=
- TimestampDifferenceMilliseconds(current_time, initial_time) %
+ TimestampDifferenceMilliseconds(initial_time, current_time) %
timeout_in_ms;
/* Wait for up to 10 seconds. */
summarized_lsn = WaitForWalSummarization(backup_state->startpoint,
- 10000, &pending_lsn);
+ timeout_in_ms, &pending_lsn);
/* If WAL summarization has progressed sufficiently, stop waiting. */
if (summarized_lsn >= backup_state->startpoint)