pub enum XactStatus {
InProgress,
Committed,
Aborted,
}Expand description
v7.37.15 (Phase C.2) — terminal state of a transaction / row version, as seen by the visibility oracle.
The current Snapshot::visible rule assumes “not in the
snapshot’s in_progress set ⟹ committed”. That holds while every
write is committed-and-alive or frozen. Once Phase C.3’s in-place
write path leaves ABORTED xmin/xmax stamps physically present
(rolled-back or crash-orphaned versions vacuum hasn’t reclaimed
yet), a version can be <= snapshot.version and ∉ in_progress
yet aborted — and the two-state rule would wrongly show its rows.
Snapshot::visible_with_status adds the third state.
The state is monotonic and immutable once terminal: a version
only ever moves InProgress → {Committed, Aborted} and never back,
so a live oracle lookup for a version outside the snapshot’s frozen
in_progress set returns the same answer forever — which is why
the snapshot stays a value type and only the oracle is shared.
Variants§
InProgress
Allocated but not yet committed or aborted.
Committed
Committed — its inserts are real, its deletes took effect.
Aborted
Rolled back / crash-orphaned — its inserts never happened, its deletes never took effect.
Trait Implementations§
Source§impl Clone for XactStatus
impl Clone for XactStatus
Source§fn clone(&self) -> XactStatus
fn clone(&self) -> XactStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more