mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 18:02:56 +00:00
Add SIZE_OF_XLOG_RECORD_DATA_HEADER_SHORT
This commit is contained in:
@@ -211,6 +211,8 @@ pub const BKPBLOCK_HAS_DATA: u8 = 0x20;
|
||||
pub const BKPBLOCK_WILL_INIT: u8 = 0x40; /* redo will re-init the page */
|
||||
pub const BKPBLOCK_SAME_REL: u8 = 0x80; /* RelFileNode omitted, same as previous */
|
||||
|
||||
pub const SIZE_OF_XLOG_RECORD_DATA_HEADER_SHORT: usize = 2;
|
||||
|
||||
/* Information stored in bimg_info */
|
||||
pub const BKPIMAGE_HAS_HOLE: u8 = 0x01; /* page image has "hole" */
|
||||
|
||||
|
||||
@@ -29,7 +29,9 @@ use crate::tenant::Timeline;
|
||||
use pageserver_api::reltag::{RelTag, SlruKind};
|
||||
|
||||
use postgres_ffi::pg_constants::{DEFAULTTABLESPACE_OID, GLOBALTABLESPACE_OID};
|
||||
use postgres_ffi::pg_constants::{PGDATA_SPECIAL_FILES, PG_HBA};
|
||||
use postgres_ffi::pg_constants::{
|
||||
PGDATA_SPECIAL_FILES, PG_HBA, SIZE_OF_XLOG_RECORD_DATA_HEADER_SHORT,
|
||||
};
|
||||
use postgres_ffi::relfile_utils::{INIT_FORKNUM, MAIN_FORKNUM};
|
||||
use postgres_ffi::XLogFileName;
|
||||
use postgres_ffi::PG_TLI;
|
||||
@@ -264,7 +266,9 @@ where
|
||||
CheckPoint::decode(&checkpoint_bytes).context("deserialize checkpoint")?;
|
||||
let checkpoint_end_lsn = calculate_walrecord_end_lsn(
|
||||
Lsn(checkpoint.redo),
|
||||
XLOG_SIZE_OF_XLOG_RECORD + 8 + SIZEOF_CHECKPOINT,
|
||||
XLOG_SIZE_OF_XLOG_RECORD
|
||||
+ SIZE_OF_XLOG_RECORD_DATA_HEADER_SHORT
|
||||
+ SIZEOF_CHECKPOINT,
|
||||
);
|
||||
checkpoint_end_lsn == self.lsn
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user