pub struct ColdReadStats {
pub cold_reads: AtomicU64,
}Expand description
Catalog: insertion-ordered Vec<Table> for stable iter / serialize,
plus a BTreeMap<String, usize> sidecar index so get / get_mut
run in O(log n) instead of the old linear scan with per-element
string compares.
A pure BTreeMap<String, Table> was tried in an interim version
of v3.1.2 and regressed the single-table catalog benches by ~10%
(the per-element BTreeMap overhead outweighs the lookup win
when n is small). The sidecar shape preserves the insertion-order
iteration the on-disk encoding relies on and keeps last_mut
(used by the deserialize hot path) cheap.
v7.39 (pg_stat blks knife) — catalog-wide cold-tier read counter
backing pg_stat_database.blks_read. Row-granular (SPG has no 8 KB
page notion): one cold-segment row resolution = one “block read”,
one hot row access = one “block hit” — the hit RATIO monitoring
dashboards compute keeps its meaning. Volatile like PG’s stats.
Fields§
§cold_reads: AtomicU64