use correct req_lsn when gathering basebackup tar

This commit is contained in:
anastasia
2021-06-17 22:49:44 +03:00
committed by Konstantin Knizhnik
parent a3b70745a9
commit ec675bbdd6
+3 -1
View File
@@ -290,7 +290,9 @@ impl PageServerHandler {
// find latest snapshot
let snapshot_lsn =
restore_local_repo::find_latest_snapshot(&self.conf, timelineid).unwrap();
let req_lsn = lsn.unwrap_or(snapshot_lsn);
let req_lsn = lsn.unwrap_or_else(|| timeline.get_last_valid_lsn());
{
let mut writer = CopyDataSink { pgb };
let mut basebackup = basebackup::Basebackup::new(