mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-19 06:00:38 +00:00
Add assertion
This commit is contained in:
@@ -495,7 +495,10 @@ pub fn import_wal_from_tar<R: Repository, Reader: Read>(
|
||||
|
||||
match header.entry_type() {
|
||||
tar::EntryType::Regular => {
|
||||
// TODO assert filename matches segno
|
||||
// FIXME: assume postgresql tli 1 for now
|
||||
let expected_filename = XLogFileName(1, segno, pg_constants::WAL_SEGMENT_SIZE);
|
||||
let file_name = file_path.file_name().unwrap().to_string_lossy();
|
||||
ensure!(expected_filename == file_name);
|
||||
|
||||
info!("processing wal file {:?}", file_path);
|
||||
read_all_bytes(entry)?
|
||||
|
||||
@@ -577,6 +577,8 @@ impl PageServerHandler {
|
||||
let mut datadir_timeline = DatadirTimeline::<LayeredRepository>::new(
|
||||
timeline, repartition_distance);
|
||||
|
||||
// TODO ensure start_lsn matches current lsn
|
||||
|
||||
// Import wal provided via CopyData
|
||||
info!("importing wal");
|
||||
pgb.write_message(&BeMessage::CopyInResponse)?;
|
||||
|
||||
Reference in New Issue
Block a user