pub struct WalRecord<'a> {
pub offset: usize,
pub type_byte: u8,
pub commit_lsn: Option<u64>,
pub commit_unix_us: Option<i64>,
pub sql: &'a [u8],
}Expand description
v7.18 PITR — parsed WAL record, surfaced for restore / verify
tooling. The replay loop above doesn’t expose LSN/timestamp;
spgctl restore --to <timestamp> and spgctl verify need them.
Returned offsets are byte-positions inside the WAL buffer.
Fields§
§offset: usizeByte offset in the WAL buffer where this record starts.
type_byte: u8Type byte (0x01 = v3 auto-commit, 0x10 = v4 auto-commit, 0x02 = durability checkpoint marker).
commit_lsn: Option<u64>Some(lsn) for v4 records, None for v3.
commit_unix_us: Option<i64>Some(unix_us) for v4 records carrying a clock-set timestamp,
None for v3 or for v4 records explicitly written with
WAL_V4_NO_CLOCK (sentinel for “no ClockFn at commit time”).
sql: &'a [u8]SQL payload as borrowed bytes. Empty for durability markers.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for WalRecord<'a>
impl<'a> RefUnwindSafe for WalRecord<'a>
impl<'a> Send for WalRecord<'a>
impl<'a> Sync for WalRecord<'a>
impl<'a> Unpin for WalRecord<'a>
impl<'a> UnsafeUnpin for WalRecord<'a>
impl<'a> UnwindSafe for WalRecord<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more