Skip to content

Commit a5a76c1

Browse files
author
Michael Paquier
committed
Fix one-off error when waiting for necessary segment to be archived
The .ready flag file of the segment forcibly switched to when stopping the backup needs to be tracked, and not the next one.
1 parent 04c4c7b commit a5a76c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ wait_for_archive(pgBackup *backup, const char *sql)
634634

635635
/* As well as WAL file name */
636636
XLByteToSeg(lsn, targetSegNo);
637-
XLogFileName(file_name, tli, targetSegNo + 1);
637+
XLogFileName(file_name, tli, targetSegNo);
638638

639639
snprintf(ready_path, lengthof(ready_path),
640640
"%s/pg_xlog/archive_status/%s.ready", pgdata,

0 commit comments

Comments
 (0)