mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-17 05:00:38 +00:00
ingest_heapam_record: preserve original bailing behavior
This commit is contained in:
@@ -690,7 +690,7 @@ impl<'a> WalIngest<'a> {
|
||||
IngestRecordOutcome::UnknownRecordType
|
||||
}
|
||||
} else {
|
||||
IngestRecordOutcome::UnknownRecordType
|
||||
bail!("Unknown RMGR {} for Heap decoding", decoded.xl_rmid);
|
||||
}
|
||||
}
|
||||
15 => {
|
||||
@@ -793,7 +793,7 @@ impl<'a> WalIngest<'a> {
|
||||
IngestRecordOutcome::UnknownRecordType
|
||||
}
|
||||
} else {
|
||||
IngestRecordOutcome::UnknownRecordType
|
||||
bail!("Unknown RMGR {} for Heap decoding", decoded.xl_rmid);
|
||||
}
|
||||
}
|
||||
16 => {
|
||||
@@ -896,7 +896,7 @@ impl<'a> WalIngest<'a> {
|
||||
IngestRecordOutcome::UnknownRecordType
|
||||
}
|
||||
} else {
|
||||
IngestRecordOutcome::UnknownRecordType
|
||||
bail!("Unknown RMGR {} for Heap decoding", decoded.xl_rmid);
|
||||
}
|
||||
}
|
||||
pg_version => {
|
||||
@@ -904,6 +904,14 @@ impl<'a> WalIngest<'a> {
|
||||
}
|
||||
};
|
||||
|
||||
match outcome {
|
||||
IngestRecordOutcome::Stored | IngestRecordOutcome::Noop => {}
|
||||
IngestRecordOutcome::UnknownRecordType | IngestRecordOutcome::UnexpectedRecordType => {
|
||||
// TODO: get rid of this by returning a structured error instead of anyhow
|
||||
unreachable!("we bail instead of producing such variants")
|
||||
}
|
||||
}
|
||||
|
||||
// Clear the VM bits if required.
|
||||
if new_heap_blkno.is_some() || old_heap_blkno.is_some() {
|
||||
let vm_rel = RelTag {
|
||||
|
||||
Reference in New Issue
Block a user