pub struct SequenceValueAllocation {
pub reservation: SequenceValueReservation,
pub logged_value: Option<i64>,
}Expand description
A reservation with the durable position it requires.
Fields§
§reservation: SequenceValueReservation§logged_value: Option<i64>The value the durable record must hold, as called and with no log count, before any value of the reservation is handed out. It is set when the reservation uses up the values an earlier record covered, and lies up to 32 fetches past the reservation, where PostgreSQL writes it to its log. A sequence that loses its exact position continues after this value, so no value at or below it is handed out twice.
Implementations§
Source§impl SequenceValueAllocation
impl SequenceValueAllocation
Sourcepub fn record_value(
&self,
position: SequenceValuePosition,
covering: Option<i64>,
increment: i64,
min_value: i64,
max_value: i64,
) -> Option<i64>
pub fn record_value( &self, position: SequenceValuePosition, covering: Option<i64>, increment: i64, min_value: i64, max_value: i64, ) -> Option<i64>
The value the durable record must hold, as called and with no log count, before the reservation is handed out, or None when the record covers the reservation already. position is the position the reservation continues. covering is the value of the record known to cover that position, or None when the position was read from a record, which covers nothing past itself.