From c205e96d89f91b35a337af5cf05e99f814dde04e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arpad=20M=C3=BCller?= Date: Wed, 25 Oct 2023 20:40:59 +0200 Subject: [PATCH] Pass min_lsn instead, as per suggestions it's safer https://github.com/neondatabase/neon/pull/3689/files#r1115650916 --- pageserver/src/pgdatadir_mapping.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pageserver/src/pgdatadir_mapping.rs b/pageserver/src/pgdatadir_mapping.rs index 61949f5c32..a3352563aa 100644 --- a/pageserver/src/pgdatadir_mapping.rs +++ b/pageserver/src/pgdatadir_mapping.rs @@ -362,7 +362,7 @@ impl Timeline { (false, false) => { // This can happen if no commit records have been processed yet, e.g. // just after importing a cluster. - Ok(LsnForTimestamp::NoData(max_lsn)) + Ok(LsnForTimestamp::NoData(min_lsn)) } (true, false) => { // Only found a commit with timestamp smaller than the request. @@ -373,7 +373,7 @@ impl Timeline { } (false, true) => { // Didn't find any commit timestamps smaller than the request - Ok(LsnForTimestamp::Past(max_lsn)) + Ok(LsnForTimestamp::Past(min_lsn)) } (true, true) => Ok(LsnForTimestamp::Present(commit_lsn)), }