Skip to content

Commit f243b53

Browse files
robertmhaaspull[bot]
authored andcommitted
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
1 parent f825eb3 commit f243b53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/backup/basebackup_incremental.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,12 +436,12 @@ PrepareForIncrementalBackup(IncrementalBackupInfo *ib,
436436
* drifting to something that is not a multiple of ten.
437437
*/
438438
timeout_in_ms -=
439-
TimestampDifferenceMilliseconds(current_time, initial_time) %
439+
TimestampDifferenceMilliseconds(initial_time, current_time) %
440440
timeout_in_ms;
441441

442442
/* Wait for up to 10 seconds. */
443443
summarized_lsn = WaitForWalSummarization(backup_state->startpoint,
444-
10000, &pending_lsn);
444+
timeout_in_ms, &pending_lsn);
445445

446446
/* If WAL summarization has progressed sufficiently, stop waiting. */
447447
if (summarized_lsn >= backup_state->startpoint)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy