Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d6166f0

Browse files
author
Arthur Zakirov
committed
Wait for LSN to be replayed after waiting LSN to be archived
1 parent 45fc4c3 commit d6166f0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/backup.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,6 @@ pg_start_backup(const char *label, bool smooth, pgBackup *backup)
648648
*/
649649
if (!stream_wal)
650650
pg_switch_wal(conn);
651-
/* Wait for start_lsn to be received by replica */
652-
if (from_replica)
653-
wait_replica_wal_lsn(backup->start_lsn, true);
654651

655652
if (!stream_wal)
656653
/*
@@ -659,6 +656,10 @@ pg_start_backup(const char *label, bool smooth, pgBackup *backup)
659656
* mode.
660657
*/
661658
wait_wal_lsn(backup->start_lsn);
659+
660+
/* Wait for start_lsn to be replayed by replica */
661+
if (from_replica)
662+
wait_replica_wal_lsn(backup->start_lsn, true);
662663
}
663664

664665
/*

0 commit comments

Comments
 (0)