mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-28 19:21:48 +02:00
Fix defects in PrepareForIncrementalBackup.
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
This commit is contained in:
parent
8ce5aef2e6
commit
dffde5bf16
@ -436,12 +436,12 @@ PrepareForIncrementalBackup(IncrementalBackupInfo *ib,
|
||||
* 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)
|
||||
|
Loading…
Reference in New Issue
Block a user