pub fn detect_wraparound(old_xmin: u32, current_xmin: u32) -> WraparoundCheckExpand description
Detect if xmin wraparound has occurred.
PostgreSQL transaction IDs are 32-bit unsigned integers that wrap around after ~4 billion transactions. When this happens, new xmin values will be smaller than old ones by a large margin (> 2 billion).
§Arguments
old_xmin- The previously recorded xmin valuecurrent_xmin- The current database transaction ID
§Returns
WraparoundCheck::WraparoundDetected if wraparound occurred, Normal otherwise.