diff --git a/libs/pageserver_api/src/models.rs b/libs/pageserver_api/src/models.rs index 0a7c9717ca..f2dd3a0ebf 100644 --- a/libs/pageserver_api/src/models.rs +++ b/libs/pageserver_api/src/models.rs @@ -1418,11 +1418,6 @@ pub struct TimelineInfo { pub last_record_lsn: Lsn, pub prev_record_lsn: Option, - /// Legacy field, retained for one version to enable old storage controller to - /// decode (it was a mandatory field). - #[serde(default, rename = "latest_gc_cutoff_lsn")] - pub _unused: Lsn, - /// The LSN up to which GC has advanced: older data may still exist but it is not available for clients. /// This LSN is not suitable for deciding where to create branches etc: use [`TimelineInfo::min_readable_lsn`] instead, /// as it is easier to reason about. diff --git a/pageserver/src/http/routes.rs b/pageserver/src/http/routes.rs index 3f36ff9904..3a3b4202dd 100644 --- a/pageserver/src/http/routes.rs +++ b/pageserver/src/http/routes.rs @@ -445,6 +445,9 @@ async fn build_timeline_info_common( let (pitr_history_size, within_ancestor_pitr) = timeline.get_pitr_history_stats(); + // Externally, expose the lowest LSN that can be used to create a branch. + // Internally we distinguish between the planned GC cutoff (PITR point) and the "applied" GC cutoff (where we + // actually trimmed data to), which can pass each other when PITR is changed. let min_readable_lsn = std::cmp::max( timeline.get_gc_cutoff_lsn(), *timeline.get_applied_gc_cutoff_lsn(), @@ -461,7 +464,6 @@ async fn build_timeline_info_common( initdb_lsn, last_record_lsn, prev_record_lsn: Some(timeline.get_prev_record_lsn()), - _unused: Default::default(), // Unused, for legacy decode only min_readable_lsn, applied_gc_cutoff_lsn: *timeline.get_applied_gc_cutoff_lsn(), current_logical_size: current_logical_size.size_dont_care_about_accuracy(),