update PITR

This commit is contained in:
Thang Pham
2022-07-05 09:51:18 -04:00
parent 0205e29185
commit 93e136a03c
2 changed files with 4 additions and 1 deletions

View File

@@ -2190,7 +2190,7 @@ impl LayeredTimeline {
// Calculate pitr cutoff point.
// If we cannot determine a cutoff LSN, be conservative and don't GC anything.
let mut pitr_cutoff_lsn = cutoff;
let mut pitr_cutoff_lsn = *self.get_latest_gc_cutoff_lsn();
if let Ok(timeline) =
tenant_mgr::get_local_timeline_with_load(self.tenant_id, self.timeline_id)

View File

@@ -59,6 +59,9 @@ def test_branch_and_gc(neon_simple_env: NeonEnv):
'compaction_period': '1 s',
'compaction_threshold': '2',
'image_creation_threshold': '1',
# set PITR interval to be small, so we can do GC
'pitr_interval': '1 s'
})
timeline_main = env.neon_cli.create_timeline(f'test_main', tenant_id=tenant)