Log when vm_size=0

This commit is contained in:
Erik Grinaker
2024-11-26 12:11:04 +01:00
parent 204eaa194f
commit ee4cbe8778
2 changed files with 5 additions and 1 deletions

View File

@@ -1022,7 +1022,7 @@ pub struct DatadirModification<'a> {
pub tline: &'a Timeline,
/// Current LSN of the modification
lsn: Lsn,
pub lsn: Lsn,
// The modifications are not applied directly to the underlying key-value store.
// The put-functions add the modifications here, and they are flushed to the

View File

@@ -335,6 +335,10 @@ impl WalIngest {
// it doesn't exist. So check if the VM page(s) exist, and skip the WAL
// record if it doesn't.
let vm_size = get_relsize(modification, vm_rel, ctx).await?;
if vm_size == 0 {
let lsn = modification.lsn;
log::info!("ingest_clear_vm_bits: vm_rel {vm_rel} has 0 size at LSN {lsn}, flags={flags} old={old_heap_blkno:?} new={new_heap_blkno:?}");
}
if let Some(blknum) = new_vm_blk {
if blknum >= vm_size {
new_vm_blk = None;