Skip to content

Commit a66e683

Browse files
author
Michael Paquier
committed
Improve comment explaining how search_next_wal works with LSN
This makes the explanation a bit clearer, as the LSN in this function is used with the current timeline to generate the file name.
1 parent ced83f7 commit a66e683

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

restore.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,12 @@ search_next_wal(const char *path, XLogRecPtr *need_lsn, parray *timelines)
10211021
parray_remove(timelines, i + 1);
10221022
/* XXX: should we add a linebreak when we find a timeline? */
10231023

1024-
/* Move to next xlog segment */
1024+
/*
1025+
* Move to next xlog segment. Note that we need to increment
1026+
* by XLogSegSize to jump directly to the next WAL segment file
1027+
* and as this value is used to generate the WAL file name with
1028+
* the current timeline of backup.
1029+
*/
10251030
*need_lsn += XLogSegSize;
10261031
}
10271032
}

0 commit comments

Comments
 (0)