mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-24 00:20:37 +00:00
WIP promising quiescing mechanism
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use std::fmt;
|
||||
use std::num::ParseIntError;
|
||||
use std::ops::RangeInclusive;
|
||||
use std::str::FromStr;
|
||||
|
||||
use anyhow::Context;
|
||||
@@ -320,6 +321,19 @@ impl TenantTimelineId {
|
||||
pub fn empty() -> Self {
|
||||
Self::new(TenantId::from([0u8; 16]), TimelineId::from([0u8; 16]))
|
||||
}
|
||||
|
||||
pub fn tenant_range(tenant_id: TenantId) -> RangeInclusive<Self> {
|
||||
RangeInclusive::new(
|
||||
Self {
|
||||
tenant_id,
|
||||
timeline_id: TimelineId::from_array([u8::MIN; 16]),
|
||||
},
|
||||
Self {
|
||||
tenant_id,
|
||||
timeline_id: TimelineId::from_array([u8::MAX; 16]),
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for TenantTimelineId {
|
||||
|
||||
Reference in New Issue
Block a user