Allow update_gc_info to download files on-demand.

This commit is contained in:
Heikki Linnakangas
2022-12-28 10:48:33 +02:00
committed by Heikki Linnakangas
parent fefe19a284
commit 890ff3803e

View File

@@ -2699,9 +2699,7 @@ impl Timeline {
if let Some(pitr_cutoff_timestamp) = now.checked_sub(pitr) {
let pitr_timestamp = to_pg_timestamp(pitr_cutoff_timestamp);
match self
.find_lsn_for_timestamp(pitr_timestamp)
.no_ondemand_download()?
match with_ondemand_download(|| self.find_lsn_for_timestamp(pitr_timestamp)).await?
{
LsnForTimestamp::Present(lsn) => lsn,
LsnForTimestamp::Future(lsn) => {