From 953ad21104d43bdb7237f06ffa89914893575bb4 Mon Sep 17 00:00:00 2001 From: Konstantin Knizhnik Date: Wed, 2 Oct 2024 18:46:26 +0300 Subject: [PATCH] Make clippy happy --- pageserver/src/basebackup.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pageserver/src/basebackup.rs b/pageserver/src/basebackup.rs index b81d1e3abf..8aa4a3671d 100644 --- a/pageserver/src/basebackup.rs +++ b/pageserver/src/basebackup.rs @@ -280,6 +280,7 @@ where } else { 0 }) as u64); + let normal_shutdown = checkpoint_end_lsn == self.lsn; let lazy_slru_download = self.timeline.get_lazy_slru_download() && !self.full_backup; @@ -418,11 +419,9 @@ where // In future we will not generate AUX record for "pg_logical/replorigin_checkpoint" at all, // but now we should handle (skip) it for backward compatibility. continue; - } else if path == "pg_stat/pgstat.stat" { - if checkpoint_end_lsn != self.lsn { - // Drop statistic in case of abnormal termination (shtiodown checkopint was not written - continue; - } + } else if path == "pg_stat/pgstat.stat" && !normal_shutdown { + // Drop statistic in case of abnormal termination (shtiodown checkopint was not written + continue; } let header = new_tar_header(&path, content.len() as u64)?; self.ar