From 325dd4127760573de53b713acf4301ff74c234da Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Fri, 16 Jul 2021 17:11:40 +0300 Subject: [PATCH] Remove unused constructor function. This was failing to compile with rustc nightly version, because the datatype of 'fullPageWrites' was changed. See discussion at https://github.com/zenithdb/zenith/issues/207#issuecomment-881478570. But since the function is actually unused, let's just remove it. --- postgres_ffi/src/xlog_utils.rs | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/postgres_ffi/src/xlog_utils.rs b/postgres_ffi/src/xlog_utils.rs index 272815d153..4b35e2b27c 100644 --- a/postgres_ffi/src/xlog_utils.rs +++ b/postgres_ffi/src/xlog_utils.rs @@ -332,29 +332,6 @@ impl XLogLongPageHeaderData { pub const SIZEOF_CHECKPOINT: usize = std::mem::size_of::(); impl CheckPoint { - pub fn new(lsn: u64, timeline: u32) -> CheckPoint { - CheckPoint { - redo: lsn, - ThisTimeLineID: timeline, - PrevTimeLineID: timeline, - fullPageWrites: true, // TODO: get actual value of full_page_writes - nextXid: FullTransactionId { - value: pg_constants::FIRST_NORMAL_TRANSACTION_ID as u64, - }, // TODO: handle epoch? - nextOid: pg_constants::FIRST_BOOTSTRAP_OBJECT_ID, - nextMulti: 1, - nextMultiOffset: 0, - oldestXid: pg_constants::FIRST_NORMAL_TRANSACTION_ID, - oldestXidDB: 0, - oldestMulti: 1, - oldestMultiDB: 0, - time: 0, - oldestCommitTsXid: 0, - newestCommitTsXid: 0, - oldestActiveXid: pg_constants::INVALID_TRANSACTION_ID, - } - } - pub fn encode(&self) -> Bytes { let b: [u8; SIZEOF_CHECKPOINT]; b = unsafe { std::mem::transmute::(*self) };